From 2e7fdfd459604df0b0dada343e25c3f0691620d2 Mon Sep 17 00:00:00 2001 From: Torsten Martinsen Date: Thu, 4 Jul 2024 23:00:35 +0200 Subject: [PATCH] Add version to GW status. Show space as open for all instances. --- frontend/esp32/main/controller.cpp | 4 +--- frontend/esp32/main/gateway.cpp | 3 +++ frontend/esp32/version.txt | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/frontend/esp32/main/controller.cpp b/frontend/esp32/main/controller.cpp index b0ad9091..6817cc97 100644 --- a/frontend/esp32/main/controller.cpp +++ b/frontend/esp32/main/controller.cpp @@ -258,10 +258,8 @@ void Controller::check_thursday() } state = State::open; if (is_main) - { Slack_writer::instance().announce_open(); - is_space_open = true; - } + is_space_open = true; } Buttons::Keys Controller::read_keys(bool log) diff --git a/frontend/esp32/main/gateway.cpp b/frontend/esp32/main/gateway.cpp index a20324d2..1e3a9b15 100644 --- a/frontend/esp32/main/gateway.cpp +++ b/frontend/esp32/main/gateway.cpp @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -52,6 +53,8 @@ void Gateway::set_status(const cJSON* status) cJSON_AddItemToObject(payload, "token", jtoken); auto jident = cJSON_CreateString(get_identifier().c_str()); cJSON_AddItemToObject(payload, "device", jident); + auto version = cJSON_CreateString(esp_app_get_description()->version); + cJSON_AddItemToObject(payload, "version", version); cJSON_AddItemToObject(payload, "status", status_copy); auto data = cJSON_Print(payload); cJSON_Print_wrapper pw(data); diff --git a/frontend/esp32/version.txt b/frontend/esp32/version.txt index df1fe2f8..5bc23cdb 100644 --- a/frontend/esp32/version.txt +++ b/frontend/esp32/version.txt @@ -1 +1 @@ -1.3.22 +1.3.23