From f9a64b6e523a4d3a7b352660b42074b5be3c8476 Mon Sep 17 00:00:00 2001 From: iranl Date: Thu, 8 Feb 2024 20:54:09 +0100 Subject: [PATCH] Fixes --- Network.h | 7 ++++--- WebCfgServer.cpp | 4 +--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Network.h b/Network.h index b7b142a..6b6dbc0 100644 --- a/Network.h +++ b/Network.h @@ -63,8 +63,8 @@ public: void publishPresenceDetection(char* csv); int mqttConnectionState(); // 0 = not connected; 1 = connected; 2 = connected and mqtt processed - const char* _latestVersion; - const char* _latestVersionUrl; + const char* latestHubVersion; + const char* latestHubVersionUrl; bool encryptionSupported(); const String networkDeviceName() const; @@ -114,7 +114,8 @@ private: char _mqttConnectionStateTopic[211] = {0}; String _lockPath; - String _latestVersion; + const char* _latestVersion; + const char* _latestVersionUrl; HTTPClient https; Preferences* _preferences; diff --git a/WebCfgServer.cpp b/WebCfgServer.cpp index 3315590..960709e 100644 --- a/WebCfgServer.cpp +++ b/WebCfgServer.cpp @@ -613,10 +613,8 @@ void WebCfgServer::buildHtml(String& response) } printParameter(response, "Firmware", version.c_str(), "/info"); - String _latestVersion = _network->latestHubVersion(); - //if (_latestVersion.toFloat() > atof(NUKI_HUB_VERSION) || (_latestVersion.toFloat() == atof(NUKI_HUB_VERSION) && _latestVersion.c_str() != NUKI_HUB_VERSION)) { - printParameter(response, "Latest Firmware", _latestVersion, GITHUB_LATEST_RELEASE_URL); + printParameter(response, "Latest Firmware", _network->latestHubVersion(), GITHUB_LATEST_RELEASE_URL); //} response.concat("

");