Fix reboot issue

This commit is contained in:
fvanroie 2020-04-08 11:59:18 +02:00
parent 79b9381cfd
commit a517c5f579

View File

@ -279,12 +279,11 @@ void dispatchReboot(bool saveConfig)
mqttStop(); // Stop the MQTT Client first mqttStop(); // Stop the MQTT Client first
#endif #endif
debugStop(); debugStop();
delay(250);
wifiStop(); wifiStop();
Log.verbose(F("-------------------------------------")); Log.verbose(F("-------------------------------------"));
Log.notice(F("STOP: Properly Rebooting the MCU now!")); Log.notice(F("STOP: Properly Rebooting the MCU now!"));
Serial.flush();
ESP.restart(); ESP.restart();
delay(5000);
} }
void dispatch_button(uint8_t id, const char * event) void dispatch_button(uint8_t id, const char * event)
@ -296,7 +295,7 @@ void dispatch_button(uint8_t id, const char * event)
void dispatchWebUpdate(const char * espOtaUrl) void dispatchWebUpdate(const char * espOtaUrl)
{ {
Log.verbose("FWUP: Checking for updates at URL: %s", espOtaUrl); Log.verbose(F("FWUP: Checking for updates at URL: %s"), espOtaUrl);
otaHttpUpdate(espOtaUrl); otaHttpUpdate(espOtaUrl);
} }