From 68f09f03f85f837a75c622a58e56f7755e8ef5a7 Mon Sep 17 00:00:00 2001 From: proddy Date: Sat, 9 Mar 2024 14:50:23 +0100 Subject: [PATCH 1/4] formatting console --- src/console.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/console.cpp b/src/console.cpp index 24933e8a0..a8a88f4d3 100644 --- a/src/console.cpp +++ b/src/console.cpp @@ -594,13 +594,15 @@ void EMSESPShell::stopped() { // show welcome banner void EMSESPShell::display_banner() { println(); - printfln("┌───────────────────────────────────────┐"); - printfln("│ %sEMS-ESP version %-12s%s │", COLOR_BOLD_ON, EMSESP_APP_VERSION, COLOR_BOLD_OFF); - printfln("│ %s%shttps://github.com/emsesp/EMS-ESP32%s │", COLOR_BRIGHT_GREEN, COLOR_UNDERLINE, COLOR_RESET); - printfln("│ │"); - printfln("│ type %shelp%s to show available commands │", COLOR_UNDERLINE, COLOR_RESET); - printfln("│ use %ssu%s to access Admin commands │", COLOR_UNDERLINE, COLOR_RESET); - printfln("└───────────────────────────────────────┘"); + printfln("┌──────────────────────────────────────────┐"); + printfln("│ %sEMS-ESP version %-12s%s │", COLOR_BOLD_ON, EMSESP_APP_VERSION, COLOR_BOLD_OFF); + printfln("│ │"); + printfln("│ %shelp%s to show available commands │", COLOR_UNDERLINE, COLOR_RESET); + printfln("│ %ssu%s to access admin commands │", COLOR_UNDERLINE, COLOR_RESET); + printfln("│ │"); + printfln("│ %s%shttps://github.com/emsesp/EMS-ESP32%s │", COLOR_BRIGHT_GREEN, COLOR_UNDERLINE, COLOR_RESET); + printfln("│ │"); + printfln("└──────────────────────────────────────────┘"); println(); // set console name From d25ead5208b199becd3f8f3a189f04ef2e35dabb Mon Sep 17 00:00:00 2001 From: proddy Date: Sat, 9 Mar 2024 14:50:37 +0100 Subject: [PATCH 2/4] update version in standalone --- platformio.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio.ini b/platformio.ini index f2d871743..58f1e2458 100644 --- a/platformio.ini +++ b/platformio.ini @@ -188,7 +188,7 @@ platform = native build_flags = -DARDUINOJSON_ENABLE_STD_STRING=1 -DARDUINOJSON_ENABLE_PROGMEM=1 -DARDUINOJSON_ENABLE_ARDUINO_STRING -DARDUINOJSON_USE_DOUBLE=0 -DEMSESP_DEBUG -DEMSESP_STANDALONE -DEMSESP_TEST - -DEMSESP_DEFAULT_LOCALE=\"en\" -DEMSESP_DEFAULT_TX_MODE=8 -DEMSESP_DEFAULT_VERSION=\"3.6.5-dev\" -DEMSESP_DEFAULT_BOARD_PROFILE=\"S32\" + -DEMSESP_DEFAULT_LOCALE=\"en\" -DEMSESP_DEFAULT_TX_MODE=8 -DEMSESP_DEFAULT_VERSION=\"3.6.5-dev.16\" -DEMSESP_DEFAULT_BOARD_PROFILE=\"S32\" -lpthread -D__linux__ -std=gnu++11 -Og -ggdb From c75f7b6c7de18e4c30b2ba0d4ddd9bfc4eac58c0 Mon Sep 17 00:00:00 2001 From: proddy Date: Sat, 9 Mar 2024 14:50:52 +0100 Subject: [PATCH 3/4] simulate hc's --- scripts/dump_entities.sh | 2 +- src/devices/thermostat.cpp | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/scripts/dump_entities.sh b/scripts/dump_entities.sh index e0ba0ee30..e676ac4a2 100755 --- a/scripts/dump_entities.sh +++ b/scripts/dump_entities.sh @@ -4,6 +4,6 @@ # run from top folder like `sh ./scripts/dump_entities.sh` rm -f dump_entities.csv make clean -make ARGS=-DEMSESP_STANDALONE_DUMP +make ARGS=-DEMSESP_STANDALONE echo "test entity_dump" | ./emsesp | python3 ./scripts/dump_entities.py > dump_entities.csv cat dump_entities.csv \ No newline at end of file diff --git a/src/devices/thermostat.cpp b/src/devices/thermostat.cpp index d9d28b474..04f2ec738 100644 --- a/src/devices/thermostat.cpp +++ b/src/devices/thermostat.cpp @@ -233,7 +233,8 @@ std::shared_ptr Thermostat::heating_circuit(const ui return heating_circuit; } } - LOG_DEBUG("Heating circuit not fond on device 0x%02X", device_id()); + + LOG_DEBUG("Heating circuit not found on device 0x%02X", device_id()); return nullptr; // not found } @@ -4224,9 +4225,11 @@ void Thermostat::register_device_values() { break; } -#if defined(EMSESP_STANDALONE_DUMP) +#if defined(EMSESP_STANDALONE) // if we're just dumping out values, create a single dummy hc - register_device_values_hc(std::make_shared(1, this->model())); // hc=1 + auto new_hc = std::make_shared(1, this->model()); // hc = 1 + heating_circuits_.push_back(new_hc); + register_device_values_hc(new_hc); #endif } From b94b3e7e2e66932be6c130e76a66f51bbd7a0c8a Mon Sep 17 00:00:00 2001 From: proddy Date: Sat, 9 Mar 2024 14:51:03 +0100 Subject: [PATCH 4/4] added comment to show test add example --- src/test/test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/test.cpp b/src/test/test.cpp index da2fdd791..d405c50d1 100644 --- a/src/test/test.cpp +++ b/src/test/test.cpp @@ -301,7 +301,7 @@ void Test::run_test(uuid::console::Shell & shell, const std::string & cmd, const if (command == "add") { shell.printfln("Testing Adding a device (product_id %d), with all values...", id2); - test("add", id1, id2); // e.g. 8 172 + test("add", id1, id2); // e.g. "test add 0x8 172" shell.invoke_command("show values"); ok = true; }