From 1cbeb1bc532875275ccf7a841dc749f6651becc9 Mon Sep 17 00:00:00 2001 From: fvanroie Date: Sun, 10 Apr 2022 18:45:01 +0200 Subject: [PATCH] Fix for nvs_iterator_t in Arduino core v1 --- src/sys/net/hasp_time.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sys/net/hasp_time.cpp b/src/sys/net/hasp_time.cpp index 6994b03a..0a6a877f 100644 --- a/src/sys/net/hasp_time.cpp +++ b/src/sys/net/hasp_time.cpp @@ -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);