SensESP 3.0.1
Universal Signal K sensor toolkit ESP32
Loading...
Searching...
No Matches
sensesp::ButtonHandler Class Reference

Default Button Handler for SensESPApp applications. More...

#include <sensesp/system/button.h>

Inheritance diagram for sensesp::ButtonHandler:
[legend]

Public Member Functions

 ButtonHandler (int pin, String config_path="")
 
- Public Member Functions inherited from sensesp::MinimalButtonHandler
 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_long_press () override
 Handle a long button press (over 1 second).
 
- Protected Member Functions inherited from sensesp::MinimalButtonHandler
virtual void handle_button_press ()
 Handle a brief button press (less than one second).
 
virtual void handle_very_long_press ()
 Handle a very long button press (over 5 seconds).
 

Additional Inherited Members

- Protected Attributes inherited from sensesp::MinimalButtonHandler
elapsedMillis time_since_press_event
 
- Protected Attributes inherited from sensesp::BaseButtonHandler
std::unique_ptr< AceButton > button_
 

Detailed Description

Default Button Handler for SensESPApp applications.

This button handler implements restart on short press, network settings reset on a long press, and factory reset on a very long press.

Definition at line 22 of file button.h.

Constructor & Destructor Documentation

◆ ButtonHandler()

sensesp::ButtonHandler::ButtonHandler ( int pin,
String config_path = "" )
inline

Definition at line 24 of file button.h.

Member Function Documentation

◆ handle_long_press()

void sensesp::ButtonHandler::handle_long_press ( )
overrideprotectedvirtual

Handle a long button press (over 1 second).

Reimplemented from sensesp::MinimalButtonHandler.

Definition at line 9 of file button.cpp.

Here is the call graph for this function:

The documentation for this class was generated from the following files: