mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 08:19:52 +03:00
renamed command refresh to fetch
This commit is contained in:
@@ -107,7 +107,7 @@ void EMSESPShell::add_console_commands() {
|
|||||||
|
|
||||||
commands->add_command(ShellContext::MAIN,
|
commands->add_command(ShellContext::MAIN,
|
||||||
CommandFlags::USER,
|
CommandFlags::USER,
|
||||||
flash_string_vector{F_(refresh)},
|
flash_string_vector{F_(fetch)},
|
||||||
[&](Shell & shell, const std::vector<std::string> & arguments __attribute__((unused))) {
|
[&](Shell & shell, const std::vector<std::string> & arguments __attribute__((unused))) {
|
||||||
shell.printfln(F("Requesting data from EMS devices"));
|
shell.printfln(F("Requesting data from EMS devices"));
|
||||||
console_commands_loaded_ = false;
|
console_commands_loaded_ = false;
|
||||||
@@ -177,11 +177,10 @@ void EMSESPShell::add_console_commands() {
|
|||||||
flash_string_vector{F_(n_mandatory)},
|
flash_string_vector{F_(n_mandatory)},
|
||||||
[](Shell & shell, const std::vector<std::string> & arguments) {
|
[](Shell & shell, const std::vector<std::string> & arguments) {
|
||||||
uint8_t tx_mode = std::strtol(arguments[0].c_str(), nullptr, 10);
|
uint8_t tx_mode = std::strtol(arguments[0].c_str(), nullptr, 10);
|
||||||
|
// save the tx_mode
|
||||||
EMSESP::emsespSettingsService.update(
|
EMSESP::emsespSettingsService.update(
|
||||||
[&](EMSESPSettings & settings) {
|
[&](EMSESPSettings & settings) {
|
||||||
settings.tx_mode = tx_mode;
|
settings.tx_mode = tx_mode;
|
||||||
shell.printfln(F_(tx_mode_fmt), tx_mode);
|
|
||||||
return StateUpdateResult::CHANGED;
|
return StateUpdateResult::CHANGED;
|
||||||
},
|
},
|
||||||
"local");
|
"local");
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ MAKE_PSTR_WORD(read)
|
|||||||
MAKE_PSTR_WORD(version)
|
MAKE_PSTR_WORD(version)
|
||||||
MAKE_PSTR_WORD(values)
|
MAKE_PSTR_WORD(values)
|
||||||
MAKE_PSTR_WORD(system)
|
MAKE_PSTR_WORD(system)
|
||||||
MAKE_PSTR_WORD(refresh)
|
MAKE_PSTR_WORD(fetch)
|
||||||
MAKE_PSTR_WORD(restart)
|
MAKE_PSTR_WORD(restart)
|
||||||
MAKE_PSTR_WORD(format)
|
MAKE_PSTR_WORD(format)
|
||||||
MAKE_PSTR_WORD(raw)
|
MAKE_PSTR_WORD(raw)
|
||||||
|
|||||||
Reference in New Issue
Block a user