SparkAbsoluteEncoder
- class rev.SparkAbsoluteEncoder
Bases:
AbsoluteEncoderGet an instance of this class by using SparkBase::GetEncoder() or SparkBase::GetEncoder(SparkMaxRelativeEncoder::Type, int).
- getPosition() float
Get the position of the motor. This returns the native units of ‘rotations’ by default, and can be changed by a scale factor using AbsoluteEncoderConfig::PositionConversionFactor().
- Returns:
Number of rotations of the motor
- getVelocity() float
Get the velocity of the motor. This returns the native units of ‘rotations per second’ by default, and can be changed by a scale factor using AbsoluteEncoderConfig::VelocityConversionFactor().
- Returns:
Number of rotations per second of the motor