First Version to be updateable over API
All checks were successful
Test compiling project / test (push) Successful in 2m34s
All checks were successful
Test compiling project / test (push) Successful in 2m34s
This commit is contained in:
@@ -83,7 +83,7 @@ Firmware OTA::createErrorResponse(const String& errorMsg) {
|
||||
};
|
||||
}
|
||||
|
||||
void OTA::run_ota_update(String url, std::function<void()> callback_started, std::function<void()> callback_finished, std::function<void(int, int)> callback_progress, std::function<void(int)> callback_error) {
|
||||
void run_ota_update(String url, std::function<void()> callback_started, std::function<void()> callback_finished, std::function<void(int, int)> callback_progress, std::function<void(int)> callback_error) {
|
||||
Log.verbose("Starting OTA upgrade");
|
||||
HTTPUpdate httpUpdate;
|
||||
httpUpdate.onStart(callback_started);
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <Arduino.h>
|
||||
#endif
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
class OTA {
|
||||
@@ -15,7 +16,7 @@ class OTA {
|
||||
Firmware getLatestVersionOnServer();
|
||||
|
||||
bool checkForUpdate();
|
||||
void run_ota_update(String url, std::function<void()> callback_started, std::function<void()> callback_finished, std::function<void(int, int)> callback_progress, std::function<void(int)> callback_error);
|
||||
|
||||
|
||||
private:
|
||||
bool _isHTTPS = false;
|
||||
@@ -25,4 +26,6 @@ class OTA {
|
||||
Firmware createErrorResponse(const String& errorMsg);
|
||||
};
|
||||
|
||||
void run_ota_update(String url, std::function<void()> callback_started, std::function<void()> callback_finished, std::function<void(int, int)> callback_progress, std::function<void(int)> callback_error);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user