REVLib - C++
|
#include <SparkFlexExternalEncoder.h>
Inherits rev::RelativeEncoder.
Public Member Functions | |
SparkFlexExternalEncoder (SparkFlexExternalEncoder &&rhs)=default | |
SparkFlexExternalEncoder & | operator= (SparkFlexExternalEncoder &&rhs)=default |
SparkFlexExternalEncoder (const SparkFlexExternalEncoder &rhs)=default | |
~SparkFlexExternalEncoder () override=default | |
double | GetPosition () const override |
double | GetVelocity () const override |
REVLibError | SetPosition (double position) override |
![]() | |
virtual | ~RelativeEncoder () |
Friends | |
class | SparkFlex |
|
default |
|
default |
|
overridedefault |
|
default |
|
overridevirtual |
Get the position of the motor. This returns the native units of 'rotations' by default, and can be changed by a scale factor using ExternalEncoderConfig::PositionConversionFactor().
Implements rev::RelativeEncoder.
|
overridevirtual |
Get the velocity of the motor. This returns the native units of 'RPM' by default, and can be changed by a scale factor using ExternalEncoderConfig::VelocityConversionFactor().
Implements rev::RelativeEncoder.
|
overridevirtual |
Set the position of the encoder.
position | Number of rotations of the motor |
Implements rev::RelativeEncoder.
|
friend |