Implement OTA update functionality with configuration and response handling; add necessary protobuf definitions and update main loop integration
This commit is contained in:
@@ -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;
|
||||
};
|
||||
Reference in New Issue
Block a user