mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-08 00:39:50 +03:00
Call read commands from Web #2116
This commit is contained in:
12
src/system.h
12
src/system.h
@@ -63,6 +63,7 @@ class System {
|
||||
void loop();
|
||||
|
||||
// commands
|
||||
static bool command_read(const char * value, const int8_t id);
|
||||
static bool command_send(const char * value, const int8_t id);
|
||||
static bool command_publish(const char * value, const int8_t id);
|
||||
static bool command_fetch(const char * value, const int8_t id);
|
||||
@@ -124,6 +125,8 @@ class System {
|
||||
static bool is_valid_gpio(uint8_t pin, bool has_psram = false);
|
||||
static bool load_board_profile(std::vector<int8_t> & data, const std::string & board_profile);
|
||||
|
||||
static bool readCommand(const char * data);
|
||||
|
||||
static void restart_requested(bool restart_requested) {
|
||||
restart_requested_ = restart_requested;
|
||||
}
|
||||
@@ -170,6 +173,14 @@ class System {
|
||||
readonly_mode_ = readonly_mode;
|
||||
}
|
||||
|
||||
bool developer_mode() {
|
||||
return developer_mode_;
|
||||
}
|
||||
|
||||
void developer_mode(bool developer_mode) {
|
||||
developer_mode_ = developer_mode;
|
||||
}
|
||||
|
||||
// Boolean Format API/MQTT
|
||||
uint8_t bool_format() {
|
||||
return bool_format_;
|
||||
@@ -398,6 +409,7 @@ class System {
|
||||
uint16_t modbus_port_;
|
||||
uint8_t modbus_max_clients_;
|
||||
uint32_t modbus_timeout_;
|
||||
bool developer_mode_;
|
||||
|
||||
// ethernet
|
||||
uint8_t phy_type_;
|
||||
|
||||
Reference in New Issue
Block a user