2021-01-03 21:43:35 +00:00
|
|
|
#ifndef TASK_OTA_H_
|
|
|
|
#define TASK_OTA_H_
|
|
|
|
|
|
|
|
#include <ArduinoOTA.h>
|
2021-03-12 22:21:45 +00:00
|
|
|
#include <TaskManager.h>
|
2021-01-03 21:43:35 +00:00
|
|
|
|
2021-03-12 22:21:45 +00:00
|
|
|
class OTATask : public Task {
|
2021-01-03 21:43:35 +00:00
|
|
|
public:
|
2021-03-12 22:21:45 +00:00
|
|
|
OTATask();
|
|
|
|
virtual ~OTATask();
|
2021-01-03 21:43:35 +00:00
|
|
|
|
2021-03-12 22:21:45 +00:00
|
|
|
virtual bool setup(std::shared_ptr<Configuration> config, std::shared_ptr<BoardConfig> boardConfig) override;
|
|
|
|
virtual bool loop(std::shared_ptr<Configuration> config) override;
|
2021-01-03 21:43:35 +00:00
|
|
|
|
|
|
|
private:
|
2021-03-12 22:21:45 +00:00
|
|
|
std::shared_ptr<ArduinoOTAClass> _ota;
|
|
|
|
bool _beginCalled;
|
2021-01-03 21:43:35 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|