Increase OTA delays to allow GUI console updates

This commit is contained in:
Theo Arends 2024-11-12 16:57:41 +01:00
parent 0fb39b9bac
commit 88810fc92c
1 changed files with 2 additions and 3 deletions

View File

@ -1489,12 +1489,11 @@ void Every250mSeconds(void)
Response_P(PSTR("{\"" D_CMND_UPGRADE "\":\""));
if (ota_result) {
ResponseAppend_P(PSTR(D_JSON_SUCCESSFUL ". " D_JSON_RESTARTING));
TasmotaGlobal.restart_flag = 2;
TasmotaGlobal.restart_flag = 5; // Allow time for webserver to update console
} else {
ResponseAppend_P(PSTR(D_JSON_FAILED " %s"), ESPhttpUpdate.getLastErrorString().c_str());
}
ResponseAppend_P(PSTR("\"}"));
// TasmotaGlobal.restart_flag = 2; // Restart anyway to keep memory clean webserver
MqttPublishPrefixTopicRulesProcess_P(STAT, PSTR(D_CMND_UPGRADE));
AllowInterrupts(1);
}
@ -1624,7 +1623,7 @@ void Every250mSeconds(void)
if (1 == RtcSettings.ota_loader) {
RtcSettings.ota_loader = 0;
AddLog(LOG_LEVEL_DEBUG, PSTR("OTA: Propagating upload"));
TasmotaGlobal.ota_state_flag = 3;
TasmotaGlobal.ota_state_flag = 6; // Allow time for webserver to update console
}
#endif // FIRMWARE_MINIMAL