|
LightLib
PROS library for VEX V5: EKF/MCL localization, RAMSETE path following, high-level chassis API
|
#include <integratedEncoder.hpp>
Public Member Functions | |
| IntegratedEncoder (const okapi::Motor &imotor) | |
| Integrated motor encoder. | |
| IntegratedEncoder (std::int8_t iport, bool ireversed=false) | |
| Integrated motor encoder. | |
| virtual double | get () const override |
| Get the current sensor value. | |
| virtual std::int32_t | reset () override |
| Reset the sensor to zero. | |
| virtual double | controllerGet () override |
| Get the sensor value for use in a control loop. | |
Public Member Functions inherited from okapi::RotarySensor | |
| virtual | ~RotarySensor () |
Protected Attributes | |
| std::uint8_t | port |
| std::int8_t | reversed {1} |
Definition at line 13 of file integratedEncoder.hpp.
| okapi::IntegratedEncoder::IntegratedEncoder | ( | const okapi::Motor & | imotor | ) |
Integrated motor encoder.
Uses the encoder inside the V5 motor.
| imotor | The motor to use the encoder from. |
| okapi::IntegratedEncoder::IntegratedEncoder | ( | std::int8_t | iport, |
| bool | ireversed = false |
||
| ) |
Integrated motor encoder.
Uses the encoder inside the V5 motor.
| iport | The motor's port number in the range [1, 21]. |
| ireversed | Whether the encoder is reversed. |
|
overridevirtual |
Get the sensor value for use in a control loop.
This method might be automatically called in another thread by the controller.
PROS_ERR on a failure. Implements okapi::ControllerInput< double >.
|
overridevirtual |
Get the current sensor value.
PROS_ERR on a failure. Implements okapi::RotarySensor.
|
overridevirtual |
Reset the sensor to zero.
1 on success, PROS_ERR on fail Implements okapi::ContinuousRotarySensor.
|
protected |
Definition at line 53 of file integratedEncoder.hpp.
|
protected |
Definition at line 54 of file integratedEncoder.hpp.