renamed command refresh to fetch

This commit is contained in:
proddy
2020-07-27 18:54:53 +02:00
parent fe13b7559d
commit 63737833ae
2 changed files with 3 additions and 4 deletions

View File

@@ -107,7 +107,7 @@ void EMSESPShell::add_console_commands() {
commands->add_command(ShellContext::MAIN,
CommandFlags::USER,
flash_string_vector{F_(refresh)},
flash_string_vector{F_(fetch)},
[&](Shell & shell, const std::vector<std::string> & arguments __attribute__((unused))) {
shell.printfln(F("Requesting data from EMS devices"));
console_commands_loaded_ = false;
@@ -177,11 +177,10 @@ void EMSESPShell::add_console_commands() {
flash_string_vector{F_(n_mandatory)},
[](Shell & shell, const std::vector<std::string> & arguments) {
uint8_t tx_mode = std::strtol(arguments[0].c_str(), nullptr, 10);
// save the tx_mode
EMSESP::emsespSettingsService.update(
[&](EMSESPSettings & settings) {
settings.tx_mode = tx_mode;
shell.printfln(F_(tx_mode_fmt), tx_mode);
return StateUpdateResult::CHANGED;
},
"local");

View File

@@ -73,7 +73,7 @@ MAKE_PSTR_WORD(read)
MAKE_PSTR_WORD(version)
MAKE_PSTR_WORD(values)
MAKE_PSTR_WORD(system)
MAKE_PSTR_WORD(refresh)
MAKE_PSTR_WORD(fetch)
MAKE_PSTR_WORD(restart)
MAKE_PSTR_WORD(format)
MAKE_PSTR_WORD(raw)