SensESP 3.0.1
Universal Signal K sensor toolkit ESP32
|
Minimal Button Handler. More...
#include <sensesp/system/minimal_button.h>
Public Member Functions | |
MinimalButtonHandler (int pin, String config_path="") | |
virtual void | handleEvent (AceButton *button, uint8_t event_type, uint8_t button_state) override |
Public Member Functions inherited from sensesp::BaseButtonHandler | |
BaseButtonHandler (int pin, String config_path="") | |
Protected Member Functions | |
virtual void | handle_button_press () |
Handle a brief button press (less than one second). | |
virtual void | handle_long_press () |
Handle a long button press (over 1 second). | |
virtual void | handle_very_long_press () |
Handle a very long button press (over 5 seconds). | |
Protected Attributes | |
elapsedMillis | time_since_press_event |
Protected Attributes inherited from sensesp::BaseButtonHandler | |
std::unique_ptr< AceButton > | button_ |
Minimal Button Handler.
This is a minimal button handler that implements restart on short press and factory reset on a very long press.
This class may be extended to implement more complex button handlers.
Definition at line 23 of file minimal_button.h.
|
inline |
Definition at line 25 of file minimal_button.h.
|
inlineprotectedvirtual |
Handle a brief button press (less than one second).
Definition at line 59 of file minimal_button.h.
|
inlineprotectedvirtual |
Handle a long button press (over 1 second).
Reimplemented in sensesp::ButtonHandler.
Definition at line 69 of file minimal_button.h.
|
inlineprotectedvirtual |
Handle a very long button press (over 5 seconds).
Definition at line 74 of file minimal_button.h.
|
inlineoverridevirtual |
|
protected |
Definition at line 54 of file minimal_button.h.