Merge pull request #4620 from ascillato/patch-1

Fix ArduinoOTA for Core 2.5.0 (fix is backwards compatible)
This commit is contained in:
andrethomas2 2018-12-14 01:09:24 +02:00 committed by GitHub
commit 7857e9cd89
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();