22 lines
449 B
C++
22 lines
449 B
C++
#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;
|
|
};
|