mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-09-13 21:54:07 +00:00
check for nvs1 partition
This commit is contained in:
+7
-1
@@ -1746,9 +1746,15 @@ void EMSESP::start() {
|
|||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
// start NVS storage
|
// 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
|
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
|
// set valid GPIOs list based on ESP32 chip/platform type
|
||||||
system_.set_valid_system_gpios();
|
system_.set_valid_system_gpios();
|
||||||
|
|||||||
Reference in New Issue
Block a user