Fix for nvs_iterator_t in Arduino core v1

This commit is contained in:
fvanroie 2022-04-10 18:45:01 +02:00
parent b1b8141506
commit 1cbeb1bc53

View File

@ -76,6 +76,7 @@ bool timeGetConfig(const JsonObject& settings)
settings["ntp"][2] = preferences.getString("ntp3", NTPSERVER3);
preferences.end();
#if ESP_ARDUINO_VERSION_MAJOR >= 2
nvs_iterator_t it = nvs_entry_find("nvs", "time", NVS_TYPE_ANY);
while(it != NULL) {
nvs_entry_info_t info;
@ -83,6 +84,7 @@ bool timeGetConfig(const JsonObject& settings)
it = nvs_entry_next(it);
printf("key '%s', type '%d' \n", info.key, info.type);
};
#endif
if(changed) configOutput(settings, TAG_TIME);