#include <AnalogInput.h>
Inherited by rev::SparkMaxAnalogSensor.
◆ ~AnalogInput()
virtual rev::AnalogInput::~AnalogInput |
( |
| ) |
|
|
inlinevirtual |
◆ GetVoltage()
virtual double rev::AnalogInput::GetVoltage |
( |
| ) |
const |
|
pure virtual |
◆ GetPosition()
virtual double rev::AnalogInput::GetPosition |
( |
| ) |
const |
|
pure virtual |
Get the position of the motor. Returns value in the native unit of 'volt' by default, and can be changed by a scale factor using setPositionConversionFactor().
- Returns
- Position of the sensor in volts
Implemented in rev::SparkMaxAnalogSensor.
◆ SetPositionConversionFactor()
virtual REVLibError rev::AnalogInput::SetPositionConversionFactor |
( |
double |
factor | ) |
|
|
pure virtual |
Set the conversion factor for the position of the analog sensor. By default, revolutions per volt is 1. Changing the position conversion factor will also change the position units.
- Parameters
-
factor | The conversion factor which will be multiplied by volts |
- Returns
- REVLibError::kOk if successful
Implemented in rev::SparkMaxAnalogSensor.
◆ GetPositionConversionFactor()
virtual double rev::AnalogInput::GetPositionConversionFactor |
( |
| ) |
const |
|
pure virtual |
Get the current conversion factor for the position of the analog sensor.
- Returns
- Analog position conversion factor
Implemented in rev::SparkMaxAnalogSensor.
◆ SparkMaxAnalogSensor
The documentation for this class was generated from the following file: