system commands withing command (api/mqtt/console), alternative to #2182

This commit is contained in:
MichaelDvP
2024-11-28 15:40:42 +01:00
parent 0850737208
commit 30fca2a190
7 changed files with 155 additions and 78 deletions

View File

@@ -73,6 +73,7 @@ class System {
static bool command_message(const char * value, const int8_t id);
static bool command_info(const char * value, const int8_t id, JsonObject output);
static bool command_response(const char * value, const int8_t id, JsonObject output);
static bool command_service(const char * cmd, const char * value);
static bool get_value_info(JsonObject root, const char * cmd);
static void get_value_json(JsonObject output, const std::string & circuit, const std::string & name, JsonVariant val);
@@ -165,6 +166,14 @@ class System {
return analog_enabled_;
}
void analog_enabled(bool b) {
analog_enabled_ = b;
}
void hide_led(bool b) {
hide_led_ = b;
}
bool readonly_mode() {
return readonly_mode_;
}