mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
show commands has a verbose mode
This commit is contained in:
@@ -256,7 +256,7 @@ void EMSESPShell::add_console_commands() {
|
||||
uint16_t offset = Helpers::hextoint(arguments.back().c_str());
|
||||
EMSESP::send_read_request(type_id, device_id, offset, EMS_MAX_TELEGRAM_LENGTH);
|
||||
} else {
|
||||
// send with length to send immediatly and trigger publish read_id
|
||||
// send with length to send immediately and trigger publish read_id
|
||||
EMSESP::send_read_request(type_id, device_id, 0, EMS_MAX_TELEGRAM_LENGTH);
|
||||
}
|
||||
});
|
||||
@@ -375,8 +375,8 @@ void EMSESPShell::add_console_commands() {
|
||||
|
||||
// validate the command
|
||||
if (arguments.size() < 2) {
|
||||
shell.print(F("Available commands are: "));
|
||||
Command::show(shell, device_type);
|
||||
shell.print(F("Missing command. Available commands are: "));
|
||||
Command::show(shell, device_type, false); // non-verbose mode
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -403,14 +403,13 @@ void EMSESPShell::add_console_commands() {
|
||||
}
|
||||
|
||||
if (ok && json.size()) {
|
||||
doc.shrinkToFit();
|
||||
serializeJsonPretty(doc, shell);
|
||||
shell.println();
|
||||
return;
|
||||
} else if (!ok) {
|
||||
shell.println(F("Unknown command, value, or id."));
|
||||
shell.print(F("Available commands are: "));
|
||||
Command::show(shell, device_type);
|
||||
Command::show(shell, device_type, false); // non-verbose mode
|
||||
}
|
||||
},
|
||||
[&](Shell & shell __attribute__((unused)), const std::vector<std::string> & arguments) -> std::vector<std::string> {
|
||||
|
||||
Reference in New Issue
Block a user