mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 08:19:52 +03:00
console: watch input more flexible, json size
This commit is contained in:
@@ -307,11 +307,11 @@ void EMSESPShell::add_console_commands() {
|
|||||||
emsesp::EMSESP::watch(EMSESP::WATCH_ON); // on
|
emsesp::EMSESP::watch(EMSESP::WATCH_ON); // on
|
||||||
} else if (arguments[0] == read_flash_string(F_(off))) {
|
} else if (arguments[0] == read_flash_string(F_(off))) {
|
||||||
emsesp::EMSESP::watch(EMSESP::WATCH_OFF); // off
|
emsesp::EMSESP::watch(EMSESP::WATCH_OFF); // off
|
||||||
} else if (emsesp::EMSESP::watch() == EMSESP::WATCH_OFF) {
|
|
||||||
shell.printfln(F_(invalid_watch));
|
|
||||||
return;
|
|
||||||
} else {
|
} else {
|
||||||
watch_id = Helpers::hextoint(arguments[0].c_str());
|
watch_id = Helpers::hextoint(arguments[0].c_str());
|
||||||
|
if ((emsesp::EMSESP::watch() == EMSESP::WATCH_OFF) && watch_id) {
|
||||||
|
emsesp::EMSESP::watch(EMSESP::WATCH_ON); // on
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (arguments.size() == 2) {
|
if (arguments.size() == 2) {
|
||||||
@@ -380,7 +380,7 @@ void EMSESPShell::add_console_commands() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
DynamicJsonDocument doc(EMSESP_MAX_JSON_SIZE_LARGE);
|
DynamicJsonDocument doc(EMSESP_MAX_JSON_SIZE_DYN);
|
||||||
JsonObject json = doc.to<JsonObject>();
|
JsonObject json = doc.to<JsonObject>();
|
||||||
|
|
||||||
bool ok = false;
|
bool ok = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user