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