Package com.revrobotics.spark
Class SparkAbsoluteEncoder
java.lang.Object
com.revrobotics.spark.SparkAbsoluteEncoder
- All Implemented Interfaces:
AbsoluteEncoder
-
Method Summary
Modifier and TypeMethodDescriptiondoubleGet the position of the motor.doubleGet the velocity of the motor.
-
Method Details
-
getPosition
public double getPosition()Description copied from interface:AbsoluteEncoderGet the position of the motor. This returns the native units of 'rotations' by default, and can be changed by a scale factor usingAbsoluteEncoderConfig.positionConversionFactor(double).- Specified by:
getPositionin interfaceAbsoluteEncoder- Returns:
- Number of rotations of the motor
-
getVelocity
public double getVelocity()Description copied from interface:AbsoluteEncoderGet the velocity of the motor. This returns the native units of 'rotations per minute' by default, and can * be changed by a scale factor usingAbsoluteEncoderConfig.velocityConversionFactor(double).- Specified by:
getVelocityin interfaceAbsoluteEncoder- Returns:
- Number of rotations per minute of the motor
-