REVLib - C++
|
#include <MotorFeedbackSensor.h>
Inherits rev::CANSensor.
Inherited by rev::AbsoluteEncoder, rev::CANAnalog, and rev::CANEncoder.
Public Member Functions | |
virtual | ~MotorFeedbackSensor () |
REVLibError | SetInverted (bool inverted) override=0 |
bool | GetInverted () const override=0 |
Public Member Functions inherited from rev::CANSensor | |
virtual | ~CANSensor () |
Friends | |
class | CANAnalog |
class | CANEncoder |
class | AbsoluteEncoder |
A sensor that can be used to provide rotational feedback to a motor controller
|
inlinevirtual |
|
overridepure virtual |
Set the phase of the MotorFeedbackSensor so that it is set to be in phase with the motor itself. This only works for quadrature encoders and analog sensors. This will throw an error if the user tries to set the inversion of the hall sensor.
inverted | The phase of the sensor |
Implements rev::CANSensor.
Implemented in rev::SparkFlexExternalEncoder, rev::SparkMaxAbsoluteEncoder, rev::SparkMaxAlternateEncoder, rev::SparkMaxAnalogSensor, rev::SparkMaxRelativeEncoder, rev::CANAnalog, rev::CANEncoder, rev::RelativeEncoder, and rev::AbsoluteEncoder.
|
overridepure virtual |
Get the phase of the MotorFeedbackSensor. This will just return false if the user tries to get the inversion of the hall sensor.
Implements rev::CANSensor.
Implemented in rev::AbsoluteEncoder, rev::SparkFlexExternalEncoder, rev::SparkMaxAbsoluteEncoder, rev::SparkMaxAlternateEncoder, rev::SparkMaxAnalogSensor, rev::SparkMaxRelativeEncoder, rev::CANAnalog, rev::CANEncoder, and rev::RelativeEncoder.
|
friend |
|
friend |
|
friend |