mirror of
https://github.com/H3ALY/Wireless-PC-Switch.git
synced 2025-12-19 18:28:22 +00:00
Create ota_setup.ino
This commit is contained in:
committed by
GitHub
parent
803fd3c68a
commit
341acb085d
19
core/ota_setup.ino
Normal file
19
core/ota_setup.ino
Normal file
@@ -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