Skip to content

Commit

Permalink
Merge pull request arendst#4620 from ascillato/patch-1
Browse files Browse the repository at this point in the history
Fix ArduinoOTA for Core 2.5.0 (fix is backwards compatible)
  • Loading branch information
andrethomas2 authored Dec 13, 2018
2 parents 651005c + aab1e11 commit 4051f28
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sonoff/sonoff.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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([]()
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 4051f28

Please sign in to comment.