some big change using state machine
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
#include <ArduinoOTA.h>
|
||||
#include "ota.h"
|
||||
|
||||
OTAHandler::OTAHandler(std::string hostname) {
|
||||
ArduinoOTA.setHostname(hostname.c_str());
|
||||
OTAHandler::OTAHandler(std::string_view hostname) {
|
||||
ArduinoOTA.setHostname(hostname.data());
|
||||
ArduinoOTA.onStart([]() {
|
||||
Serial.println("OTA Start");
|
||||
});
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
#pragma once
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
|
||||
class OTAHandler {
|
||||
public:
|
||||
OTAHandler(std::string hostname);
|
||||
OTAHandler(std::string_view hostname);
|
||||
|
||||
void poll();
|
||||
};
|
||||
Reference in New Issue
Block a user