Handle the system input, the behavior associated to the button inputs.
More...
|
| namespace | __private |
| | private handling namespace, used for unit testing
|
| |
|
|
void | button_clicked_callback (const uint8_t consecutiveButtonCheck, const bool isFirstClick) |
| |
|
void | button_hold_callback (const uint8_t consecutiveButtonCheck, const uint32_t buttonHoldDuration, const bool isEndOfPress, const bool isFirstClick) |
| |
| void | init (const bool wasPoweredByUserInterrupt) |
| | Call once on system start.
|
| |
|
void | loop () |
| | Call often to handle button updates.
|
| |
|
void | button_disable_usermode () |
| | disable custom user modes
|
| |
|
bool | is_button_usermode_enabled () |
| | return true if custom user modes are enabled
|
| |
|
bool | add_button_click_event (uint32_t clickCount) |
| | Signal a button click event.
|
| |
|
bool | add_button_press_event (uint32_t clickCount, uint32_t pressDuration, bool isEndOfPress) |
| | Signal a button press event.
|
| |
|
|
static constexpr uint32_t | BRIGHTNESS_RAMP_DURATION_MS = 2000 |
| | duration of the brightness ramp
|
| |
|
static constexpr uint32_t | BRIGHTNESS_LOOP_UPDATE_EVERY = 20 |
| | frequency update of the ramp
|
| |
| static constexpr uint32_t | BRIGHTNESS_RAMP_SATURATION_MAX_DURATION_MS |
| | duration of the brightness ramp saturation before switching behavior
|
| |
|
bool | isSystemOn = false |
| | holds the state of system on
|
| |
|
bool | isButtonUsermodeEnabled = false |
| | hold the boolean that configures if button's usermode UI is enabled
|
| |
Handle the system input, the behavior associated to the button inputs.
◆ init()
| void lampda::logic::inputs::init |
( |
const bool |
wasPoweredByUserInterrupt | ) |
|
Call once on system start.
- Parameters
-
| [in] | wasPoweredByUserInterrupt | Indicates if the system was powered by the user button interrupt |
◆ BRIGHTNESS_RAMP_SATURATION_MAX_DURATION_MS
| constexpr uint32_t lampda::logic::inputs::BRIGHTNESS_RAMP_SATURATION_MAX_DURATION_MS |
|
staticconstexpr |
Initial value:
duration of the brightness ramp saturation before switching behavior