From e3861d54c93af686cd45e187598eb891c33a0556 Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Fri, 29 Nov 2024 11:00:04 +0100 Subject: [PATCH] remove command txMode, fix writeable camelCase names --- src/command.cpp | 2 -- src/system.cpp | 13 +------------ 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/src/command.cpp b/src/command.cpp index 0e655a3a4..ce346bea6 100644 --- a/src/command.cpp +++ b/src/command.cpp @@ -540,7 +540,6 @@ bool Command::list(const uint8_t device_type, JsonObject output) { output["settings/showertimer"] = Helpers::translated_word(FL_(system_cmd)); output["settings/showeralert"] = Helpers::translated_word(FL_(system_cmd)); output["settings/hideled"] = Helpers::translated_word(FL_(system_cmd)); - output["settings/txmode"] = Helpers::translated_word(FL_(system_cmd)); output["settings/analogenabled"] = Helpers::translated_word(FL_(system_cmd)); output["mqtt/enabled"] = Helpers::translated_word(FL_(system_cmd)); output["ntp/enabled"] = Helpers::translated_word(FL_(system_cmd)); @@ -579,7 +578,6 @@ void Command::show(uuid::console::Shell & shell, uint8_t device_type, bool verbo sorted_cmds.emplace_back("settings/showertimer"); sorted_cmds.emplace_back("settings/showeralert"); sorted_cmds.emplace_back("settings/hideled"); - sorted_cmds.emplace_back("settings/txmode"); sorted_cmds.emplace_back("settings/analogenabled"); sorted_cmds.emplace_back("mqtt/enabled"); sorted_cmds.emplace_back("ntp/enabled"); diff --git a/src/system.cpp b/src/system.cpp index 78e767887..de288ecf2 100644 --- a/src/system.cpp +++ b/src/system.cpp @@ -1414,17 +1414,6 @@ bool System::command_service(const char * cmd, const char * value) { ok = true; } } - int n; - if (!ok && Helpers::value2number(value, n)) { - if (!strcmp(cmd, "settings/txmode") && n >= 0 && n <= 4) { - EMSESP::webSettingsService.update([&](WebSettings & settings) { - settings.tx_mode = n; - return StateUpdateResult::CHANGED; - }); - EMSESP::uart_init(); - ok = true; - } - } if (ok) { LOG_INFO("System command '%s' with value '%s'", cmd, value); @@ -1514,7 +1503,7 @@ void System::get_value_json(JsonObject output, const std::string & circuit, cons } output["readable"] = true; output["writeable"] = - (name == "txmode" || name == "showertimer" || name == "showeralert" || name == "enabled" || name == "hideled" || name == "analogenabled"); + (name == "showerTimer" || name == "showerAlert" || name == "enabled" || name == "hideLed" || name == "analogEnabled"); output["visible"] = true; if (val.is()) { output["value"] = val.as();