mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-05-02 04:05:14 +00:00
backup nvs1 if exist
This commit is contained in:
@@ -1767,7 +1767,7 @@ void System::exportSystemBackup(JsonObject output) {
|
|||||||
node = nodes.add<JsonObject>();
|
node = nodes.add<JsonObject>();
|
||||||
node["type"] = "nvs";
|
node["type"] = "nvs";
|
||||||
|
|
||||||
const char * nvs_part = "nvs";
|
const char * nvs_part = esp_partition_find_first(ESP_PARTITION_TYPE_DATA, ESP_PARTITION_SUBTYPE_DATA_NVS, "nvs1") ? "nvs1" : "nvs"; // nvs1 is on 16MBs
|
||||||
nvs_iterator_t it = nullptr;
|
nvs_iterator_t it = nullptr;
|
||||||
#if ESP_IDF_VERSION_MAJOR < 5
|
#if ESP_IDF_VERSION_MAJOR < 5
|
||||||
it = nvs_entry_find(nvs_part, "ems-esp", NVS_TYPE_ANY);
|
it = nvs_entry_find(nvs_part, "ems-esp", NVS_TYPE_ANY);
|
||||||
|
|||||||
Reference in New Issue
Block a user