Updated shit
All checks were successful
Test compiling project / test (push) Successful in 2m21s

This commit is contained in:
2025-02-17 00:12:50 +01:00
parent 7c4dd280c2
commit 3b1ab2e9e9
9 changed files with 123 additions and 32 deletions

View File

@@ -9,9 +9,9 @@
#include <ArduinoLog.h>
#include <HTTPUpdate.h>
OTA::OTA(String server_url, String currentVersion, String currentDeviceConfiguration) {
OTA::OTA(String server_url, Version currentVersion, String currentDeviceConfiguration) {
_serverUrl = server_url;
_currentVersion = parseVersion(currentVersion.c_str());
_currentVersion = currentVersion;
_current_device_configuration = currentDeviceConfiguration;
}
@@ -59,7 +59,13 @@ Firmware OTA::getLatestVersionOnServer() {
return createErrorResponse("No valid configuration found in the JSON response");
}
Configuration latest = getLatestConfiguration(configs.data(), configs.size());
if (!isVersionNewer(_currentVersion, latest.version)) {
Log.verbose("No newer version found. Server version: %d.%d.%d", latest.version.major, latest.version.minor, latest.version.patch);
}
return Firmware{
latest.version,
latest.url,