From 30d1ae5642aba05d668d5ceacfbc34f136dc3bf5 Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Wed, 22 Apr 2026 08:21:29 +0200 Subject: [PATCH] update otadata when littlefs fails --- src/core/emsesp.cpp | 2 ++ src/core/system.cpp | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/core/emsesp.cpp b/src/core/emsesp.cpp index 9d583e427..a0fa75bc0 100644 --- a/src/core/emsesp.cpp +++ b/src/core/emsesp.cpp @@ -1727,6 +1727,8 @@ void EMSESP::start() { #ifndef EMSESP_STANDALONE if (factory_settings) { LOG_WARNING("No settings found on filesystem. Using factory settings."); + // make sure OTAdata is updated with core3 format + esp_ota_set_boot_partition(esp_ota_get_running_partition()); } #endif diff --git a/src/core/system.cpp b/src/core/system.cpp index cc9ab8856..b39ce5e15 100644 --- a/src/core/system.cpp +++ b/src/core/system.cpp @@ -425,8 +425,7 @@ void System::get_partition_info() { auto t = time(nullptr); // write timestamp always with new version, if clock is not set, this will be updated with ntp EMSESP::nvs_.putULong(c, t); - // make sure OTA setting is updated with core3 format - esp_ota_set_boot_partition(esp_ota_get_running_partition()); } + } // Loop through all available partitions and update map with the version info pulled from NVS // Partitions can be app0, app1, factory, boot