mirror of https://github.com/arendst/Tasmota.git
Merge pull request #4620 from ascillato/patch-1
Fix ArduinoOTA for Core 2.5.0 (fix is backwards compatible)
This commit is contained in:
commit
7857e9cd89
|
@ -2215,7 +2215,7 @@ uint16_t arduino_ota_progress_dot_count = 0;
|
||||||
void ArduinoOTAInit(void)
|
void ArduinoOTAInit(void)
|
||||||
{
|
{
|
||||||
ArduinoOTA.setPort(8266);
|
ArduinoOTA.setPort(8266);
|
||||||
ArduinoOTA.setHostname(Settings.hostname);
|
ArduinoOTA.setHostname(my_hostname);
|
||||||
if (Settings.web_password[0] !=0) ArduinoOTA.setPassword(Settings.web_password);
|
if (Settings.web_password[0] !=0) ArduinoOTA.setPassword(Settings.web_password);
|
||||||
|
|
||||||
ArduinoOTA.onStart([]()
|
ArduinoOTA.onStart([]()
|
||||||
|
@ -2799,6 +2799,7 @@ void loop(void)
|
||||||
if (!serial_local) SerialInput();
|
if (!serial_local) SerialInput();
|
||||||
|
|
||||||
#ifdef USE_ARDUINO_OTA
|
#ifdef USE_ARDUINO_OTA
|
||||||
|
MDNS.update();
|
||||||
ArduinoOTA.handle();
|
ArduinoOTA.handle();
|
||||||
// Once OTA is triggered, only handle that and dont do other stuff. (otherwise it fails)
|
// Once OTA is triggered, only handle that and dont do other stuff. (otherwise it fails)
|
||||||
while (arduino_ota_triggered) ArduinoOTA.handle();
|
while (arduino_ota_triggered) ArduinoOTA.handle();
|
||||||
|
|
Loading…
Reference in New Issue