From 6e7728a5f78b224f24a14fccd7c4f883836ca5e7 Mon Sep 17 00:00:00 2001 From: proddy Date: Mon, 19 Oct 2020 23:15:48 +0200 Subject: [PATCH] aligning changes with standalone test version --- lib_standalone/ESP8266React.h | 64 +++++++++++++++++------------------ src/test/test.cpp | 4 ++- 2 files changed, 35 insertions(+), 33 deletions(-) diff --git a/lib_standalone/ESP8266React.h b/lib_standalone/ESP8266React.h index 0ee3471c9..8e66fb30c 100644 --- a/lib_standalone/ESP8266React.h +++ b/lib_standalone/ESP8266React.h @@ -13,38 +13,38 @@ class DummySettings { public: - uint8_t tx_mode = 1; - uint8_t ems_bus_id = 0x0B; - int8_t syslog_level = 1; // uuid::log::Level - uint32_t syslog_mark_interval = 0; - String syslog_host = "192.168.1.4"; - uint8_t master_thermostat = 0; - bool shower_timer = false; - bool shower_alert = false; - bool hide_led = false; - bool api_enabled = true; - uint16_t publish_time = 10; // seconds - uint8_t mqtt_format = 3; // 1=single, 2=nested, 3=ha, 4=custom - uint8_t mqtt_qos = 0; - bool mqtt_retain = false; - bool enabled = true; // MQTT - String hostname = "ems-esp"; - String jwtSecret = "ems-esp"; - String ssid = "ems-esp"; - String password = "ems-esp"; - String localIP; - String gatewayIP; - String subnetMask; - String staticIPConfig; - String dnsIP1; - String dnsIP2; - uint16_t publish_time_boiler; - uint16_t publish_time_thermostat; - uint16_t publish_time_solar; - uint16_t publish_time_mixing; - uint16_t publish_time_other; - uint16_t publish_time_sensor; - uint8_t bool_format; + uint8_t tx_mode = 1; + uint8_t ems_bus_id = 0x0B; + int8_t syslog_level = 1; // uuid::log::Level + uint32_t syslog_mark_interval = 0; + String syslog_host = "192.168.1.4"; + uint8_t master_thermostat = 0; + bool shower_timer = false; + bool shower_alert = false; + bool hide_led = false; + bool api_enabled = true; + uint16_t publish_time = 10; // seconds + uint8_t mqtt_format = 3; // 1=single, 2=nested, 3=ha, 4=custom + uint8_t mqtt_qos = 0; + bool mqtt_retain = false; + bool enabled = true; // MQTT + String hostname = "ems-esp"; + String jwtSecret = "ems-esp"; + String ssid = "ems-esp"; + String password = "ems-esp"; + String localIP = ""; + String gatewayIP = ""; + String subnetMask = ""; + String staticIPConfig = ""; + String dnsIP1 = ""; + String dnsIP2 = ""; + uint16_t publish_time_boiler = 10; + uint16_t publish_time_thermostat = 10; + uint16_t publish_time_solar = 10; + uint16_t publish_time_mixing = 10; + uint16_t publish_time_other = 10; + uint16_t publish_time_sensor = 10; + uint8_t bool_format = 1; // on off static void read(DummySettings & settings, JsonObject & root){}; static void read(DummySettings & settings){}; diff --git a/src/test/test.cpp b/src/test/test.cpp index cfbda7164..9ef8dcb5d 100644 --- a/src/test/test.cpp +++ b/src/test/test.cpp @@ -27,7 +27,7 @@ namespace emsesp { // used with the 'test' command, under su/admin void Test::run_test(uuid::console::Shell & shell, const std::string & command) { if (command == "default") { - run_test(shell, "render"); // add the default test case here + run_test(shell, "general"); // add the default test case here } if (command.empty()) { @@ -258,6 +258,8 @@ void Test::run_test(uuid::console::Shell & shell, const std::string & command) { 0x03, 0x25, 0x03, 0x03, 0x01, 0x03, 0x25, 0x00, 0xC8, 0x00, 0x00, 0x11, 0x01, 0x03}); shell.invoke_command("show"); + shell.invoke_command("publish"); + shell.invoke_command("show mqtt"); } if (command == "fr120") {