Fix ESP32 save settings after OTA upload

Fix ESP32 save settings after OTA upload regression from v10.0.0.3
This commit is contained in:
Theo Arends 2022-04-06 15:02:15 +02:00
parent 218d62686a
commit fcec346db8
3 changed files with 4 additions and 2 deletions

View File

@ -12,7 +12,7 @@ All notable changes to this project will be documented in this file.
- Remove support for Internet Explorer by allowing ECMAScript6 syntax using less JavaScript code bytes (#15280)
### Fixed
- ESP32 save settings after OTA upload regression from v10.0.0.3
## [11.0.0.4] 20220402
### Added

View File

@ -153,6 +153,7 @@ The latter links can be used for OTA upgrades too like ``OtaUrl http://ota.tasmo
- Wiegand 34-bit rfid reading and presentation [#14834](https://github.com/arendst/Tasmota/issues/14834)
- Orno WE517 power meter phase 2 current reactive [#14841](https://github.com/arendst/Tasmota/issues/14841)
- NeoPool NPBit and NPRead/NPReadL output
- ESP32 save settings after OTA upload regression from v10.0.0.3
- ESP32 PowerOnState [#15084](https://github.com/arendst/Tasmota/issues/15084)
### Removed

View File

@ -1172,7 +1172,6 @@ void Every250mSeconds(void)
if (2 == TasmotaGlobal.ota_state_flag) {
RtcSettings.ota_loader = 0; // Try requested image first
ota_retry_counter = OTA_ATTEMPTS;
ESPhttpUpdate.rebootOnUpdate(false);
SettingsSave(1); // Free flash for OTA update
}
if (TasmotaGlobal.ota_state_flag <= 0) {
@ -1247,10 +1246,12 @@ void Every250mSeconds(void)
AddLog(LOG_LEVEL_INFO, "OTA: unsupported protocol");
ota_result = -999;
} else {
httpUpdateLight.rebootOnUpdate(false);
ota_result = (HTTP_UPDATE_FAILED != httpUpdateLight.update(OTAclient, version));
}
#else // standard OTA over HTTP
WiFiClient OTAclient;
ESPhttpUpdate.rebootOnUpdate(false);
ota_result = (HTTP_UPDATE_FAILED != ESPhttpUpdate.update(OTAclient, full_ota_url, version));
#endif
if (!ota_result) {