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("

");