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