#include <offsettableControllerInput.hpp>
◆ OffsetableControllerInput()
| okapi::OffsetableControllerInput::OffsetableControllerInput |
( |
const std::shared_ptr< ControllerInput< double > > & |
iinput | ) |
|
|
explicit |
A ControllerInput which can be tared to change the zero position.
- Parameters
-
◆ ~OffsetableControllerInput()
| virtual okapi::OffsetableControllerInput::~OffsetableControllerInput |
( |
| ) |
|
|
virtual |
◆ controllerGet()
| double okapi::OffsetableControllerInput::controllerGet |
( |
| ) |
|
|
overridevirtual |
Get the sensor value for use in a control loop.
This method might be automatically called in another thread by the controller.
- Returns
- the current sensor value, or PROS_ERR on a failure.
Implements okapi::ControllerInput< double >.
◆ tarePosition()
| virtual void okapi::OffsetableControllerInput::tarePosition |
( |
| ) |
|
|
virtual |
Sets the "absolute" zero position of this controller input to its current position.
This does nothing if the underlying controller input returns PROS_ERR.
◆ input
| std::shared_ptr<ControllerInput<double> > okapi::OffsetableControllerInput::input |
|
protected |
◆ offset
| double okapi::OffsetableControllerInput::offset {0} |
|
protected |
The documentation for this class was generated from the following file: