Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ArduinoOTA for Core 2.5.0 (fix is backwards compatible) #4620

Merged
merged 1 commit into from
Dec 13, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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