refactor to use namespaces
This commit is contained in:
parent
64be68c740
commit
261e87a97b
10
src/ota.h
10
src/ota.h
@ -1,6 +1,9 @@
|
||||
#include <ArduinoOTA.h>
|
||||
|
||||
void setupOTA() {
|
||||
namespace Ota
|
||||
{
|
||||
|
||||
void setup() {
|
||||
ArduinoOTA.onStart([]() {
|
||||
Serial.println("Start");
|
||||
});
|
||||
@ -19,4 +22,9 @@ void setupOTA() {
|
||||
else if (error == OTA_END_ERROR) Serial.println("End Failed");
|
||||
});
|
||||
ArduinoOTA.begin();
|
||||
}
|
||||
|
||||
void loop() {
|
||||
ArduinoOTA.handle();
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user