26 lines
448 B
C++
26 lines
448 B
C++
#pragma once
|
|
|
|
#include <ArduinoOTA.h>
|
|
#include <WiFi.h>
|
|
#include <logger.hpp>
|
|
|
|
class OTAManager {
|
|
public:
|
|
OTAManager();
|
|
~OTAManager();
|
|
|
|
void begin();
|
|
void enable();
|
|
void disable();
|
|
bool isEnabled() const;
|
|
String getStatus() const;
|
|
|
|
private:
|
|
bool enabled;
|
|
String status;
|
|
|
|
void onStart();
|
|
void onEnd();
|
|
void onProgress(unsigned int progress, unsigned int total);
|
|
void onError(ota_error_t error);
|
|
}; |