REVLib - C++
|
#include <RelativeEncoder.h>
Inherited by rev::spark::SparkFlexExternalEncoder, rev::spark::SparkMaxAlternateEncoder, and rev::spark::SparkRelativeEncoder.
Public Member Functions | |
virtual | ~RelativeEncoder () |
virtual double | GetPosition () const =0 |
virtual double | GetVelocity () const =0 |
virtual REVLibError | SetPosition (double position)=0 |
Friends | |
class | spark::SparkMaxAlternateEncoder |
class | spark::SparkRelativeEncoder |
class | spark::SparkFlexExternalEncoder |
|
inlinevirtual |
|
pure virtual |
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().
Implemented in rev::spark::SparkFlexExternalEncoder, rev::spark::SparkMaxAlternateEncoder, and rev::spark::SparkRelativeEncoder.
|
pure virtual |
Get the velocity of the motor. This returns the native units of 'RPM' by default, and can be changed by a scale factor using setVelocityConversionFactor().
Implemented in rev::spark::SparkFlexExternalEncoder, rev::spark::SparkMaxAlternateEncoder, and rev::spark::SparkRelativeEncoder.
|
pure virtual |
Set the position of the encoder.
position | Number of rotations of the motor |
Implemented in rev::spark::SparkFlexExternalEncoder, rev::spark::SparkMaxAlternateEncoder, and rev::spark::SparkRelativeEncoder.
|
friend |
|
friend |
|
friend |