Interface class to abstract user selection actions from physical implementations All physical user selection classes must extend this This allows for the use of physical buttons, rotary encoders, touch screens, and other user interface methods that can move menu selections up and down, and increase or decrease throttle speeds Note if using a rotary encoder, if up is counter clockwise for menu selections, this will also be a decrease in speed, and vice versa for down with clockwise and an increase in speed.
More...
#include <UserSelectionInterface.h>
Interface class to abstract user selection actions from physical implementations All physical user selection classes must extend this This allows for the use of physical buttons, rotary encoders, touch screens, and other user interface methods that can move menu selections up and down, and increase or decrease throttle speeds Note if using a rotary encoder, if up is counter clockwise for menu selections, this will also be a decrease in speed, and vice versa for down with clockwise and an increase in speed.
◆ ~UserSelectionInterface()
virtual UserSelectionInterface::~UserSelectionInterface |
( |
| ) |
|
|
virtualdefault |
Destructor for the object.
◆ begin()
virtual void UserSelectionInterface::begin |
( |
| ) |
|
|
pure virtual |
Implement this to perform any initial startup methods or activities.
Implemented in RotaryEncoder.
◆ getUserSelectionAction()
Implement this to check for any user selection actions This should be called at least once per main loop iteration.
- Returns
- UserSelectionAction::[None|Up|UpFaster|UpFastest|Down|DownFaster|DownFastest]
Implemented in RotaryEncoder.
◆ setThrottleInverted()
void UserSelectionInterface::setThrottleInverted |
( |
| ) |
|
|
inline |
Call this method to ensure throttle is inverted compared to selection options.
◆ throttleInverted()
bool UserSelectionInterface::throttleInverted |
( |
| ) |
|
|
inline |
Check if throttle is inverted compared to up/down.
- Returns
- True if UserSelectionAction::Up decreases speed, and Down increases speed Particularly useful for rotary encoders vs. physical push buttons or touch screens
◆ _throttleInverted
bool UserSelectionInterface::_throttleInverted = false |
|
private |
The documentation for this class was generated from the following file: