check for nvs1 partition

This commit is contained in:
MichaelDvP
2026-09-05 09:53:51 +02:00
parent 3ba7099987
commit 7caa5a1ba0
+7 -1
View File
@@ -1746,9 +1746,15 @@ void EMSESP::start() {
// #endif
// start NVS storage
if (!nvs_.begin("ems-esp", false, "nvs1")) { // try bigger nvs partition on 16M flash first
#ifndef EMSESP_STANDALONE
if (esp_partition_find(ESP_PARTITION_TYPE_DATA, ESP_PARTITION_SUBTYPE_DATA_NVS, "nvs1")) {
nvs_.begin("ems-esp", false, "nvs1");
} else {
nvs_.begin("ems-esp", false, "nvs"); // fallback to small nvs
}
#else
nvs_.begin("ems-esp", false, "nvs");
#endif
// set valid GPIOs list based on ESP32 chip/platform type
system_.set_valid_system_gpios();