From 300e2b9cbd0b32d3a693fae8a4a31c4a42badb7e Mon Sep 17 00:00:00 2001 From: technyon Date: Thu, 7 Apr 2022 21:59:06 +0200 Subject: [PATCH] update ble lib; show firmware version in config page --- CMakeLists.txt | 1 + Version.h | 3 +++ WebCfgServer.cpp | 6 +++++- lib/nuki_ble | 2 +- 4 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 Version.h diff --git a/CMakeLists.txt b/CMakeLists.txt index 18ad99c..9977fca 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,6 +23,7 @@ file(GLOB SRCFILES WebCfgServer.cpp PresenceDetection.cpp PreferencesKeys.h + Version.h lib/ESP32_BLE_Arduino-1.0.1/src/*.cpp lib/ESP32_BLE_Arduino-1.0.1/src/*.h lib/WiFiManager/WiFiManager.cpp diff --git a/Version.h b/Version.h new file mode 100644 index 0000000..31c8750 --- /dev/null +++ b/Version.h @@ -0,0 +1,3 @@ +#pragma once + +#define nuki_hub_version "1.8" \ No newline at end of file diff --git a/WebCfgServer.cpp b/WebCfgServer.cpp index 177ec4a..6ec73ca 100644 --- a/WebCfgServer.cpp +++ b/WebCfgServer.cpp @@ -1,6 +1,7 @@ #include "WebCfgServer.h" #include #include "PreferencesKeys.h" +#include "Version.h" WebCfgServer::WebCfgServer(NukiWrapper* nuki, Network* network, Preferences* preferences) : server(80), @@ -191,12 +192,15 @@ void WebCfgServer::buildHtml(String& response) response.concat("NUKI Hub\n"); response.concat("\n"); response.concat("\n"); - response.concat("

Info

\n"); + response.concat("

Info

\n"); + String version = " "; + version.concat(nuki_hub_version); response.concat(""); printParameter(response, "Paired", _nuki->isPaired() ? " Yes" : " No"); printParameter(response, "MQTT Connected", _network->isMqttConnected() ? " Yes" : " No"); + printParameter(response, "Firmware", version.c_str()); response.concat("


"); response.concat("
"); diff --git a/lib/nuki_ble b/lib/nuki_ble index 54c1247..eb27962 160000 --- a/lib/nuki_ble +++ b/lib/nuki_ble @@ -1 +1 @@ -Subproject commit 54c124790b994696752c1a72daada5f72fe85a10 +Subproject commit eb2796222592630dadd76b8b23551c9ad403799d