A ton of things
Some checks failed
Test compiling project / test (push) Failing after 1m38s

This commit is contained in:
2025-02-14 21:27:04 +01:00
parent 04b2aba6ca
commit 5738eb4451
9 changed files with 333 additions and 41 deletions

27
lib/fetchOTA/fetchOTA.h Normal file
View File

@@ -0,0 +1,27 @@
#ifndef UNIT_TEST
#include <utils.h>
#ifdef UNIT_TEST
#include<ArduinoFake.h>
#else
#include <Arduino.h>
#endif
class OTA {
public:
OTA(String server_url, String currentVersion, String currentDeviceConfiguration);
Firmware getLatestVersionOnServer();
bool checkForUpdate();
private:
bool _isHTTPS = false;
String _serverUrl;
Version _currentVersion;
String _current_device_configuration;
Firmware createErrorResponse(const String& errorMsg);
};
#endif