mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-06-15 12:26:33 +03:00
formatting
This commit is contained in:
@@ -1523,9 +1523,10 @@ bool System::check_upgrade() {
|
|||||||
// changes going to v3.9 from an earlier version
|
// changes going to v3.9 from an earlier version
|
||||||
if (settings_version.major() == 3 && settings_version.minor() < 9) {
|
if (settings_version.major() == 3 && settings_version.minor() < 9) {
|
||||||
#ifndef EMSESP_STANDALONE
|
#ifndef EMSESP_STANDALONE
|
||||||
|
// AP_MODE_ALWAYS has been removed
|
||||||
EMSESP::esp32React.getAPSettingsService()->update([&](APSettings & apSettings) {
|
EMSESP::esp32React.getAPSettingsService()->update([&](APSettings & apSettings) {
|
||||||
if (apSettings.provisionMode == 0) {
|
if (apSettings.provisionMode == 0) {
|
||||||
apSettings.provisionMode = AP_MODE_DISCONNECTED; // AP_MODE_ALWAYS has been removed
|
apSettings.provisionMode = AP_MODE_DISCONNECTED; // AP_MODE_DISCONNECTED is the new default
|
||||||
LOG_INFO("Upgrade: Setting AP provision mode to auto");
|
LOG_INFO("Upgrade: Setting AP provision mode to auto");
|
||||||
return StateUpdateResult::CHANGED;
|
return StateUpdateResult::CHANGED;
|
||||||
}
|
}
|
||||||
@@ -3189,10 +3190,7 @@ bool System::uploadFirmwareURL(const char * url) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (Update.write(buf, n) != n) {
|
if (Update.write(buf, n) != n) {
|
||||||
LOG_ERROR("Firmware upload failed - flash write error at %u of %d bytes: %s",
|
LOG_ERROR("Firmware upload failed - flash write error at %u of %d bytes: %s", (unsigned)total_read, firmware_size, Update.errorString());
|
||||||
(unsigned)total_read,
|
|
||||||
firmware_size,
|
|
||||||
Update.errorString());
|
|
||||||
EMSESP::system_.systemStatus(SYSTEM_STATUS::SYSTEM_STATUS_ERROR_UPLOAD);
|
EMSESP::system_.systemStatus(SYSTEM_STATUS::SYSTEM_STATUS_ERROR_UPLOAD);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user