Class SparkAbsoluteEncoder

java.lang.Object
com.revrobotics.spark.SparkAbsoluteEncoder
All Implemented Interfaces:
AbsoluteEncoder

public class SparkAbsoluteEncoder extends Object implements AbsoluteEncoder
  • Method Details

    • getPosition

      public double getPosition()
      Description copied from interface: AbsoluteEncoder
      Get the position of the motor. This returns the native units of 'rotations' by default, and can be changed by a scale factor using setPositionConversionFactor().
      Specified by:
      getPosition in interface AbsoluteEncoder
      Returns:
      Number of rotations of the motor
    • getVelocity

      public double getVelocity()
      Description copied from interface: AbsoluteEncoder
      Get the velocity of the motor. This returns the native units of 'rotations per minute' by default, and can be changed by a scale factor using setVelocityConversionFactor().
      Specified by:
      getVelocity in interface AbsoluteEncoder
      Returns:
      Number of rotations per minute of the motor