SensESP
3.0.1
Universal Signal K sensor toolkit ESP32
Loading...
Searching...
No Matches
button.h
Go to the documentation of this file.
1
#ifndef SENSESP_SRC_SENSESP_SYSTEM_BUTTON_H_
2
#define SENSESP_SRC_SENSESP_SYSTEM_BUTTON_H_
3
4
#define DEFAULT_BUTTON_PIN 2
5
6
#include "
sensesp.h
"
7
8
#include "AceButton.h"
9
#include "elapsedMillis.h"
10
#include "
sensesp/system/minimal_button.h
"
11
12
namespace
sensesp
{
13
14
using namespace
ace_button;
15
22
class
ButtonHandler
:
public
MinimalButtonHandler
{
23
public
:
24
ButtonHandler
(
int
pin, String config_path =
""
)
25
:
MinimalButtonHandler
(pin, config_path) {}
26
27
protected
:
28
virtual
void
handle_long_press
()
override
;
29
};
30
31
}
// namespace sensesp
32
33
#endif
// SENSESP_SRC_SENSESP_SYSTEM_BUTTON_H_
sensesp::ButtonHandler
Default Button Handler for SensESPApp applications.
Definition
button.h:22
sensesp::ButtonHandler::handle_long_press
virtual void handle_long_press() override
Handle a long button press (over 1 second).
Definition
button.cpp:9
sensesp::ButtonHandler::ButtonHandler
ButtonHandler(int pin, String config_path="")
Definition
button.h:24
sensesp::MinimalButtonHandler
Minimal Button Handler.
Definition
minimal_button.h:23
minimal_button.h
sensesp
Definition
sensesp.cpp:7
sensesp.h
src
sensesp
system
button.h
Generated by
1.12.0