REVLib - C++
|
#include <SparkRelativeEncoder.h>
Inherits rev::RelativeEncoder.
Public Member Functions | |
SparkRelativeEncoder (SparkRelativeEncoder &&rhs)=default | |
SparkRelativeEncoder & | operator= (SparkRelativeEncoder &&rhs)=default |
SparkRelativeEncoder (const SparkRelativeEncoder &rhs)=default | |
~SparkRelativeEncoder () override=default | |
double | GetPosition () const override |
double | GetVelocity () const override |
REVLibError | SetPosition (double position) override |
![]() | |
virtual | ~RelativeEncoder () |
Friends | |
class | SparkBase |
Get an instance of this class by using SparkBase::GetEncoder() or SparkBase::GetEncoder(SparkRelativeEncoder::Type, int).
|
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 EncoderConfig::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 EncoderConfig::VelocityConversionFactor().
Implements rev::RelativeEncoder.
|
overridevirtual |
Set the position of the encoder.
position | Number of rotations of the motor |
Implements rev::RelativeEncoder.
|
friend |