#include "ota.h" #include "serial.h" #include #include unsigned long ota_progress_millis = 0; void onOTAStart() { // Log when OTA has started DebugPort.println("OTA update started!"); // } void onOTAProgress(size_t current, size_t final) { // Log every 1 second if (millis() - ota_progress_millis > 1000) { ota_progress_millis = millis(); DebugPort.printf("OTA Progress Current: %u bytes, Final: %u bytes\n", current, final); } } void onOTAEnd(bool success) { // Log when OTA has finished if (success) { DebugPort.println("OTA update finished successfully!"); } else { DebugPort.println("There was an error during OTA update!"); } // }