Input hardware services.
More...
#include <InternalServices.hpp>
|
| virtual void | recalibrateAxes () |
| | Force auto-calibration of all axes (analog clutch paddles)
|
| |
| virtual void | reverseLeftAxis () |
| | Change polarity of left axis (if any)
|
| |
| virtual void | reverseRightAxis () |
| | Change polarity of right axis (if any)
|
| |
| virtual void | setRotaryPulseWidthMultiplier (PulseWidthMultiplier multiplier, bool save=true) |
| | Multiply the pulse width of rotary encoders.
|
| |
| virtual PulseWidthMultiplier | getRotaryPulseWidthMultiplier () |
| | Get the current pulse width multiplier for rotary encoders.
|
| |
| virtual bool | getAxisCalibration (int &minLeft, int &maxLeft, int &minRight, int &maxRight) |
| | Get current axis calibration data.
|
| |
| virtual void | setAxisCalibration (int minLeft, int maxLeft, int minRight, int maxRight, bool save=true) |
| | Set the Axis calibration data.
|
| |
| virtual void | getAxisPolarity (bool &leftAxisReversed, bool &rightAxisReversed) |
| | Get axes polarity.
|
| |
| virtual void | setAxisPolarity (bool leftAxisReversed, bool rightAxisReversed, bool save=true) |
| | Set axes polarity.
|
| |
| virtual void | update () |
| | Repeat last input event.
|
| |
|
| static InputService & | call () |
| | Get the service provider implementing the service.
|
| |
| static void | inject (_Args &&...__args) |
| | Inject a service provider.
|
| |
| static void | inject (InputService *provider) |
| | Inject a service provider.
|
| |
| static void | reset () |
| | Remove the injected service provider (for testing)
|
| |
Input hardware services.
Definition at line 114 of file InternalServices.hpp.
◆ getAxisCalibration()
| virtual bool InputService::getAxisCalibration |
( |
int & | minLeft, |
|
|
int & | maxLeft, |
|
|
int & | minRight, |
|
|
int & | maxRight ) |
|
inlinevirtual |
Get current axis calibration data.
- Note
- To be called from the storage namespace
- Parameters
-
| [out] | minLeft | minimum ADC reading for the left clutch |
| [out] | maxLeft | maximum ADC reading for the left clutch |
| [out] | minRight | minimum ADC reading for the right clutch |
| [out] | maxRight | maximum ADC reading for the right clutch |
- Returns
- true if there are analog clutch paddles
-
true if there are no analog clutch paddles, so the output parameters were not set.
Definition at line 173 of file InternalServices.hpp.
◆ getAxisPolarity()
| virtual void InputService::getAxisPolarity |
( |
bool & | leftAxisReversed, |
|
|
bool & | rightAxisReversed ) |
|
inlinevirtual |
Get axes polarity.
- Parameters
-
| [out] | leftAxisReversed | True if the left axis is reversed |
| [out] | rightAxisReversed | True if the right axis is reversed |
Definition at line 203 of file InternalServices.hpp.
◆ getRotaryPulseWidthMultiplier()
Get the current pulse width multiplier for rotary encoders.
- Returns
- PulseWidthMultiplier A pulse width multiplier greater than zero.
Definition at line 155 of file InternalServices.hpp.
◆ recalibrateAxes()
| virtual void InputService::recalibrateAxes |
( |
| ) |
|
|
inlinevirtual |
◆ reverseLeftAxis()
| virtual void InputService::reverseLeftAxis |
( |
| ) |
|
|
inlinevirtual |
Change polarity of left axis (if any)
- Note
- Saved to flash memory without delay
Definition at line 128 of file InternalServices.hpp.
◆ reverseRightAxis()
| virtual void InputService::reverseRightAxis |
( |
| ) |
|
|
inlinevirtual |
Change polarity of right axis (if any)
- Note
- Saved to flash memory without delay
Definition at line 135 of file InternalServices.hpp.
◆ setAxisCalibration()
| virtual void InputService::setAxisCalibration |
( |
int | minLeft, |
|
|
int | maxLeft, |
|
|
int | minRight, |
|
|
int | maxRight, |
|
|
bool | save = true ) |
|
inlinevirtual |
Set the Axis calibration data.
- Note
- To be called from the storage namespace
- Parameters
-
| [in] | minLeft | minimum ADC reading for the left clutch |
| [in] | maxLeft | maximum ADC reading for the left clutch |
| [in] | minRight | minimum ADC reading for the right clutch |
| [in] | maxRight | maximum ADC reading for the right clutch |
| [in] | save | If true, save to persistent storage |
Definition at line 190 of file InternalServices.hpp.
◆ setAxisPolarity()
| virtual void InputService::setAxisPolarity |
( |
bool | leftAxisReversed, |
|
|
bool | rightAxisReversed, |
|
|
bool | save = true ) |
|
inlinevirtual |
Set axes polarity.
- Parameters
-
| leftAxisReversed | True if the left axis is reversed |
| rightAxisReversed | True if the right axis is reversed |
| save | If true, save to persistent storage |
Definition at line 214 of file InternalServices.hpp.
◆ setRotaryPulseWidthMultiplier()
| virtual void InputService::setRotaryPulseWidthMultiplier |
( |
PulseWidthMultiplier | multiplier, |
|
|
bool | save = true ) |
|
inlinevirtual |
Multiply the pulse width of rotary encoders.
- Note
- Valid values are saved to flash memory without delay.
- Parameters
-
| multiplier | A pulse width multiplier greater than zero. Valid values are between 1 and 6. Invalid values are ignored. |
| save | True to save to flash memory |
Definition at line 146 of file InternalServices.hpp.
◆ update()
| virtual void InputService::update |
( |
| ) |
|
|
inlinevirtual |
The documentation for this class was generated from the following file: