Fix ArduinoOTA for Core 2.5.0 (fix is backwards compatible)

https://github.com/arendst/Sonoff-Tasmota/issues/4619
This commit is contained in:
Adrian Scillato 2018-12-13 23:04:48 +00:00 committed by GitHub
parent aec8430693
commit dcbf5a8c94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -2215,7 +2215,7 @@ uint16_t arduino_ota_progress_dot_count = 0;
void ArduinoOTAInit(void)
{
ArduinoOTA.setPort(8266);
ArduinoOTA.setHostname(Settings.hostname);
ArduinoOTA.setHostname(my_hostname);
if (Settings.web_password[0] !=0) ArduinoOTA.setPassword(Settings.web_password);
ArduinoOTA.onStart([]()
@ -2799,6 +2799,7 @@ void loop(void)
if (!serial_local) SerialInput();
#ifdef USE_ARDUINO_OTA
MDNS.update();
ArduinoOTA.handle();
// Once OTA is triggered, only handle that and dont do other stuff. (otherwise it fails)
while (arduino_ota_triggered) ArduinoOTA.handle();