Moznost zapnout ArduinoOTA i pri bezicim konfiguracnim AP
This commit is contained in:
parent
60fb85f3ff
commit
518b1b43c8
@ -11,6 +11,9 @@
|
||||
# include <SPIFFSEditor.h>
|
||||
# include <FSWebEditor.h>
|
||||
#endif
|
||||
#ifdef USE_WIFICONFIG_ARDUINO_OTA
|
||||
# include <ArduinoOTA.h>
|
||||
#endif
|
||||
|
||||
#if defined(ESP8266)
|
||||
// ESP8266
|
||||
@ -628,6 +631,9 @@ wificonfigresult_t WiFiConfig::_setupAP(wificonfig_cb cb)
|
||||
yield();
|
||||
});
|
||||
#endif
|
||||
#ifdef USE_WIFICONFIG_ARDUINO_OTA
|
||||
ArduinoOTA.begin();
|
||||
#endif
|
||||
#ifdef USE_WIFICONFIG_FSEDITOR
|
||||
#if 0
|
||||
#if defined(ESP8266)
|
||||
@ -661,6 +667,9 @@ wificonfigresult_t WiFiConfig::_setupAP(wificonfig_cb cb)
|
||||
if (cb)
|
||||
cb(WCS_CONFIGWAIT); // volame uzivatelsky callback (napr. signalizace)
|
||||
dnsServer->processNextRequest();
|
||||
#ifdef USE_WIFICONFIG_ARDUINO_OTA
|
||||
ArduinoOTA.handle();
|
||||
#endif
|
||||
yield(); // procesy uvnitr systemu ESP potrebuji take svuj cas
|
||||
if (_timeout) {
|
||||
if (millis() > _time) {
|
||||
@ -674,6 +683,9 @@ wificonfigresult_t WiFiConfig::_setupAP(wificonfig_cb cb)
|
||||
// tady by asi melo byt zastaveni weboveho a dns serveru...
|
||||
dnsServer->stop();
|
||||
server->end();
|
||||
#ifdef USE_WIFICONFIG_ARDUINO_OTA
|
||||
ArduinoOTA.end();
|
||||
#endif
|
||||
return WCR_TIMEOUT; // nepripojeno, vyprsel timeout konfiguracniho AP
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user