From 0e67e8311e3f8c7dcfd5514476974dcd34ba0eb2 Mon Sep 17 00:00:00 2001 From: proddy Date: Sun, 9 May 2021 10:59:03 +0200 Subject: [PATCH] show commands has a verbose mode --- src/console.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/console.cpp b/src/console.cpp index 0df126eb2..d521286ad 100644 --- a/src/console.cpp +++ b/src/console.cpp @@ -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 & arguments) -> std::vector {