Implement OTA update functionality with configuration and response handling; add necessary protobuf definitions and update main loop integration

This commit is contained in:
2025-10-05 19:34:41 +02:00
parent f176e0df26
commit 46cb1a3a20
8 changed files with 189 additions and 45 deletions
+21
View File
@@ -0,0 +1,21 @@
#pragma once
#include "hardware.pb.h"
#include <ESP8266WiFi.h>
#include <ESP8266WebServer.h>
#include <ESP8266HTTPUpdateServer.h>
class OtaUpdate {
public:
OtaUpdate();
bool configure(const hardware_SensorOTAEnable& config);
void update();
void disable();
private:
hardware_SensorOTAEnable _config;
ESP8266WebServer _server;
ESP8266HTTPUpdateServer _httpUpdater;
bool _configured;
unsigned long _startTime;
};