|
LightLib
PROS library for VEX V5: EKF/MCL localization, RAMSETE path following, high-level chassis API
|
#include <potentiometer.hpp>
Public Member Functions | |
| Potentiometer (std::uint8_t iport) | |
| A potentiometer in an ADI port. | |
| Potentiometer (std::pair< std::uint8_t, std::uint8_t > iports) | |
| A potentiometer in an ADI port. | |
| virtual double | get () const override |
| Get the current sensor value. | |
| 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 | smartPort |
| std::uint8_t | port |
Definition at line 12 of file potentiometer.hpp.
| okapi::Potentiometer::Potentiometer | ( | std::uint8_t | iport | ) |
A potentiometer in an ADI port.
| iport | The ADI port number ([1, 8], [a, h], [A, H]). |
| okapi::Potentiometer::Potentiometer | ( | std::pair< std::uint8_t, std::uint8_t > | iports | ) |
A potentiometer in an ADI port.
| iports | The ports the potentiometer is plugged in to in the order {smart port, potentiometer port}. The smart port is the smart port number ([1, 21]). The potentiometer port is the ADI port number ([1, 8], [a, h], [A, H]). |
|
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.
|
protected |
Definition at line 55 of file potentiometer.hpp.
|
protected |
Definition at line 54 of file potentiometer.hpp.