|
| | Status (const uint16_t hold_ms=500, const uint16_t debounce_ms=10, const uint16_t double_click_ms=0) |
| | Constructor.
|
| |
|
|
void | setDebounceThreshold (const uint32_t msec) |
| | Set debounce time(ms)
|
| |
|
void | setHoldThreshold (const uint32_t msec) |
| | Set time to be considered hold(ms)
|
| |
| void | setDoubleClickThreshold (const uint32_t msec) |
| | Set the time within which a second click still counts as a multiple click(ms)
|
| |
|
uint32_t | getDebounceThreshold (void) const |
| | Gets the debounce time(ms)
|
| |
|
uint32_t | getHoldThreshold (void) const |
| | Gets the time to be considered hold(ms)
|
| |
| uint32_t | getDoubleClickThreshold (void) const |
| | Gets the time within which a second click still counts as a multiple click(ms)
|
| |
|
|
bool | isPressed (void) const |
| | Is pressed?
|
| |
|
bool | isReleased (void) const |
| | Is released?
|
| |
|
bool | isHolding (void) const |
| | Returns true if the button is currently held pressed.
|
| |
|
bool | wasPressed (void) const |
| | Returns true if button was pressed.
|
| |
|
bool | wasReleased (void) const |
| | Returns true if button was released.
|
| |
|
bool | wasClicked (void) const |
| | Returns true when the button is pressed briefly and released.
|
| |
|
bool | wasHold (void) const |
| | Returns true when the button has been held pressed for a while.
|
| |
|
bool | wasSingleClicked (void) const |
| | Returns true when some time has passed since the button was single clicked.
|
| |
|
bool | wasDoubleClicked (void) const |
| | Returns true when some time has passed since the button was double clicked.
|
| |
|
bool | wasDecideClickCount (void) const |
| | Returns true when some time has passed since the button was multiple clicked.
|
| |
|
uint8_t | getClickCount (void) const |
| | Gets the number of consecutive button clicks.
|
| |
|
bool | wasChangePressed (void) const |
| | Has the button press state changed?
|
| |
|
bool | wasReleasedAfterHold (void) const |
| | Pressed and released a button for more than the set hold time?
|
| |
|
bool | wasReleaseFor (const uint32_t ms) const |
| | Was it pressed for more than the specified time?
|
| |
|
bool | pressedFor (const uint32_t ms) const |
| | Is pressed for more than the specified time?
|
| |
|
bool | releasedFor (const uint32_t ms) const |
| | Is released for more than the specified time?
|
| |
|
|
void | setRawState (const uint32_t msec, const bool press) |
| |
|
void | setState (const uint32_t msec, const button_state_t state) |
| |
|
button_state_t | getState (void) const |
| |
|
uint32_t | lastChange (void) const |
| |
|
uint32_t | getUpdateMsec (void) const |
| |
Button status management.
- Note
- Class compatible with Button_Class in M5Unified