mirror of
https://github.com/H3ALY/Wireless-PC-Switch.git
synced 2026-12-04 14:01:58 +00:00
Create ota_setup.ino
This commit is contained in:
1 parent
803fd3c68a
commit
341acb085d
1 file changed
+19
@@ -0,0 +1,19 @@
|
|||||||
|
#ifndef OTA_SETUP_H
|
||||||
|
#define OTA_SETUP_H
|
||||||
|
|
||||||
|
#include <ArduinoOTA.h>
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
|
class OtaManager {
|
||||||
|
public:
|
||||||
|
void setupOTA() {
|
||||||
|
ArduinoOTA.setHostname(ota_hostname);
|
||||||
|
ArduinoOTA.begin();
|
||||||
|
}
|
||||||
|
|
||||||
|
void handleOTA() {
|
||||||
|
ArduinoOTA.handle();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
Reference in new issue
Block a user