SensESP 2.7.2
Universal Signal K sensor toolkit ESP32
Loading...
Searching...
No Matches
sensesp_base_app.h
Go to the documentation of this file.
1#ifndef _sensesp_base_app_H_
2#define _sensesp_base_app_H_
3
4// Required for RemoteDebug
5#define USE_LIB_WEBSOCKET true
6
7#ifndef SENSESP_BUTTON_PIN
8// Default button pin is 0 (GPIO0), normally connected to the BOOT button
9#define SENSESP_BUTTON_PIN 0
10#endif
11
12#include "sensesp.h"
16
17namespace sensesp {
18
19constexpr auto kDefaultHostname = "SensESP";
20
22
33 public:
37 static SensESPBaseApp* get();
38
43 virtual void start();
44
49 virtual void reset();
50
57
58 static String get_hostname();
59
60 protected:
69
70 virtual void setup();
71
73
75
78
81 return this;
82 }
83};
84
85} // namespace sensesp
86
87#endif
Initialize logging/debug output.
Construct a new transform based on a single function.
void set(const T &value)
The base class for SensESP applications.
static SensESPBaseApp * get()
Get the singleton instance of the SensESPBaseApp.
virtual void reset()
Reset the device to factory defaults.
ObservableValue< String > * hostname_
const SensESPBaseApp * set_hostname(String hostname)
static SensESPBaseApp * instance_
static String get_hostname()
Get the current hostname.
virtual void start()
Start the app (activate all the subcomponents)
SensESPBaseApp()
Construct a new SensESP Base App object.
virtual void setup()
Perform initialization of SensESPBaseApp once builder configuration is done.
ObservableValue< String > * get_hostname_observable()
Get the hostname observable object.
constexpr auto kDefaultHostname
void SetupSerialDebug(uint32_t baudrate)