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