From 3c72285c58168a86f589f980f1119b63851a4a50 Mon Sep 17 00:00:00 2001 From: Khoi Hoang <57012152+khoih-prog@users.noreply.github.com> Date: Fri, 26 Nov 2021 19:25:17 -0500 Subject: [PATCH] v1.7.6 to autodetect ESP32 core version ### Releases v1.7.6 1. Auto detect ESP32 core and use either built-in LittleFS or [LITTLEFS](https://github.com/lorol/LITTLEFS) library 2. Update `library.json` to use new `headers` for PIO --- CONTRIBUTING.md | 4 +- README.md | 107 +++++++++++------- changelog.md | 6 + examples/AutoConnect/AutoConnect.ino | 25 +++- .../AutoConnectWithFSParameters.ino | 25 +++- .../AutoConnectWithFeedback.ino | 25 +++- .../AutoConnectWithFeedbackLED.ino | 25 +++- .../ConfigOnDRD_FS_MQTT_Ptr.ino | 25 +++- .../ConfigOnDRD_FS_MQTT_Ptr_Complex.ino | 25 +++- .../ConfigOnDRD_FS_MQTT_Ptr_Medium.ino | 25 +++- .../ConfigOnDoubleReset.ino | 25 +++- examples/ConfigOnStartup/ConfigOnStartup.ino | 25 +++- examples/ConfigOnSwitch/ConfigOnSwitch.ino | 25 +++- .../ConfigOnSwitchFS/ConfigOnSwitchFS.ino | 25 +++- .../ConfigOnSwitchFS_MQTT_Ptr.ino | 25 +++- .../ConfigPortalParamsOnSwitch.ino | 25 +++- .../ESP32_FSWebServer/ESP32_FSWebServer.ino | 27 +++-- .../ESP32_FSWebServer_DRD.ino | 27 +++-- examples/ESP_FSWebServer/ESP_FSWebServer.ino | 2 +- .../ESP_FSWebServer_DRD.ino | 2 +- library.json | 9 +- library.properties | 4 +- platformio/platformio.ini | 6 +- src/ESP_WiFiManager-Impl.h | 3 +- src/ESP_WiFiManager.h | 5 +- src/ESP_WiFiManager_Debug.h | 3 +- src_cpp/ESP_WiFiManager.cpp | 3 +- src_cpp/ESP_WiFiManager.h | 5 +- src_cpp/ESP_WiFiManager_Debug.h | 3 +- src_h/ESP_WiFiManager-Impl.h | 3 +- src_h/ESP_WiFiManager.h | 5 +- src_h/ESP_WiFiManager_Debug.h | 3 +- 32 files changed, 394 insertions(+), 158 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a4630e5..d1e4306 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -15,7 +15,7 @@ If you don't find anything, please [open a new issue](https://github.com/khoih-p Please ensure to specify the following: * Arduino IDE version (e.g. 1.8.16) or Platform.io version -* `ESP8266` or `ESP32` Core Version (e.g. ESP8266 core v3.0.2 or ESP32 v2.0.0) +* `ESP8266` or `ESP32` Core Version (e.g. ESP8266 core v3.0.2 or ESP32 v2.0.1) * Contextual information (e.g. what you were trying to achieve) * Simplest possible steps to reproduce * Anything that might be relevant in your opinion, such as: @@ -29,7 +29,7 @@ Please ensure to specify the following: Arduino IDE version: 1.8.16 ESP8266 Core Version 3.0.2 OS: Ubuntu 20.04 LTS -Linux Inspiron 5.4.0-86-generic #97-Ubuntu SMP Fri Sep 17 19:19:40 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux +Linux Inspiron 5.4.0-90-generic #101-Ubuntu SMP Fri Oct 15 20:00:55 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux Context: I encountered an endless loop while trying to connect to Local WiFi. diff --git a/README.md b/README.md index 872dc85..e07c079 100644 --- a/README.md +++ b/README.md @@ -219,10 +219,10 @@ It's using a web ConfigPortal, served from the `ESP32 / ESP8266`, and operating 1. [`Arduino IDE 1.8.16+` for Arduino](https://www.arduino.cc/en/Main/Software) 2. [`ESP8266 Core 3.0.2+`](https://github.com/esp8266/Arduino) for ESP8266-based boards. [![Latest release](https://img.shields.io/github/release/esp8266/Arduino.svg)](https://github.com/esp8266/Arduino/releases/latest/). To use ESP8266 core 2.7.1+ for LittleFS. - 3. [`ESP32 Core 2.0.0+`](https://github.com/espressif/arduino-esp32) for ESP32-based boards. [![Latest release](https://img.shields.io/github/release/espressif/arduino-esp32.svg)](https://github.com/espressif/arduino-esp32/releases/latest/) - 4. [`ESP_DoubleResetDetector v1.1.2+`](https://github.com/khoih-prog/ESP_DoubleResetDetector) if using DRD feature. To install, check [![arduino-library-badge](https://www.ardu-badge.com/badge/ESP_DoubleResetDetector.svg?)](https://www.ardu-badge.com/ESP_DoubleResetDetector). Use v1.1.0+ if using LittleFS for ESP32. - 5. [`ESP_MultiResetDetector v1.1.2+`](https://github.com/khoih-prog/ESP_MultiResetDetector) if using MRD feature. To install, check [![arduino-library-badge](https://www.ardu-badge.com/badge/ESP_MultiResetDetector.svg?)](https://www.ardu-badge.com/ESP_MultiResetDetector). - 6. [`LittleFS_esp32 v1.0.6+`](https://github.com/lorol/LITTLEFS) for ESP32-based boards using LittleFS. To install, check [![arduino-library-badge](https://www.ardu-badge.com/badge/LittleFS_esp32.svg?)](https://www.ardu-badge.com/LittleFS_esp32). **Notice**: This [`LittleFS_esp32 library`](https://github.com/lorol/LITTLEFS) has been integrated to Arduino [esp32 core v1.0.6](https://github.com/espressif/arduino-esp32/tree/master/libraries/LITTLEFS). + 3. [`ESP32 Core 2.0.1+`](https://github.com/espressif/arduino-esp32) for ESP32-based boards. [![Latest release](https://img.shields.io/github/release/espressif/arduino-esp32.svg)](https://github.com/espressif/arduino-esp32/releases/latest/) + 4. [`ESP_DoubleResetDetector v1.2.0+`](https://github.com/khoih-prog/ESP_DoubleResetDetector) if using DRD feature. To install, check [![arduino-library-badge](https://www.ardu-badge.com/badge/ESP_DoubleResetDetector.svg?)](https://www.ardu-badge.com/ESP_DoubleResetDetector). Use v1.1.0+ if using LittleFS for ESP32. + 5. [`ESP_MultiResetDetector v1.2.0+`](https://github.com/khoih-prog/ESP_MultiResetDetector) if using MRD feature. To install, check [![arduino-library-badge](https://www.ardu-badge.com/badge/ESP_MultiResetDetector.svg?)](https://www.ardu-badge.com/ESP_MultiResetDetector). + 6. [`LittleFS_esp32 v1.0.6+`](https://github.com/lorol/LITTLEFS) for ESP32-based boards using LittleFS with ESP32 core v1.0.4-. To install, check [![arduino-library-badge](https://www.ardu-badge.com/badge/LittleFS_esp32.svg?)](https://www.ardu-badge.com/LittleFS_esp32). **Notice**: This [`LittleFS_esp32 library`](https://github.com/lorol/LITTLEFS) has been integrated to Arduino [ESP32 core v1.0.6+](https://github.com/espressif/arduino-esp32/tree/master/libraries/LITTLEFS) and you don't need to install it if using ESP32 core v1.0.6+ --- @@ -388,13 +388,25 @@ then connect WebBrowser to configurable ConfigPortal IP address, default is 192. // Use LittleFS #include "FS.h" - // The library will be depreciated after being merged to future major Arduino esp32 core release 2.x - // At that time, just remove this library inclusion - #include // https://github.com/lorol/LITTLEFS + // Check cores/esp32/esp_arduino_version.h + #if ( ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(2, 0, 0) ) //(ESP_ARDUINO_VERSION_MAJOR >= 2) + #warning Using ESP32 Core 1.0.6 or 2.0.0+ + // The library has been merged into esp32 core from release 1.0.6 + #include + + FS* filesystem = &LittleFS; + #define FileFS LittleFS + #define FS_Name "LittleFS" + #else + #warning Using ESP32 Core 1.0.4-. You must install LITTLEFS library + // The library has been merged into esp32 core from release 1.0.6 + #include // https://github.com/lorol/LITTLEFS + + FS* filesystem = &LITTLEFS; + #define FileFS LITTLEFS + #define FS_Name "LittleFS" + #endif - FS* filesystem = &LITTLEFS; - #define FileFS LITTLEFS - #define FS_Name "LittleFS" #elif USE_SPIFFS #include FS* filesystem = &SPIFFS; @@ -2097,7 +2109,7 @@ ESP_wifiManager.setRemoveDuplicateAPs(false); #error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting. #endif -#define ESP_WIFIMANAGER_VERSION_MIN_TARGET "ESP_WiFiManager v1.7.5" +#define ESP_WIFIMANAGER_VERSION_MIN_TARGET "ESP_WiFiManager v1.7.6" // Use from 0 to 4. Higher number, more debugging messages and memory usage. #define _WIFIMGR_LOGLEVEL_ 3 @@ -2135,12 +2147,25 @@ ESP_wifiManager.setRemoveDuplicateAPs(false); // Use LittleFS #include "FS.h" - // The library has been merged into esp32 core release 1.0.6 - #include // https://github.com/lorol/LITTLEFS + // Check cores/esp32/esp_arduino_version.h + #if ( ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(2, 0, 0) ) //(ESP_ARDUINO_VERSION_MAJOR >= 2) + #warning Using ESP32 Core 1.0.6 or 2.0.0+ + // The library has been merged into esp32 core from release 1.0.6 + #include + + FS* filesystem = &LittleFS; + #define FileFS LittleFS + #define FS_Name "LittleFS" + #else + #warning Using ESP32 Core 1.0.4-. You must install LITTLEFS library + // The library has been merged into esp32 core from release 1.0.6 + #include // https://github.com/lorol/LITTLEFS + + FS* filesystem = &LITTLEFS; + #define FileFS LITTLEFS + #define FS_Name "LittleFS" + #endif - FS* filesystem = &LITTLEFS; - #define FileFS LITTLEFS - #define FS_Name "LittleFS" #elif USE_SPIFFS #include FS* filesystem = &SPIFFS; @@ -3442,7 +3467,7 @@ This is terminal debug output when running [ConfigOnSwitchFS_MQTT_Ptr](examples/ ``` Starting ConfigOnSwichFS_MQTT_Ptr using LittleFS on ESP8266_NODEMCU_ESP12E -ESP_WiFiManager v1.7.5 +ESP_WiFiManager v1.7.6 Configuration file not found Failed to read configuration file, using default values [WM] RFC925 Hostname = ConfigOnSwichFS-MQTT @@ -3554,8 +3579,8 @@ This is terminal debug output when running [ESP32_FSWebServer_DRD](examples/ESP3 ```cpp Starting ESP32_FSWebServer_DRD with DoubleResetDetect using SPIFFS on ESP32_DEV -ESP_WiFiManager v1.7.5 -ESP_DoubleResetDetector v1.1.2 +ESP_WiFiManager v1.7.6 +ESP_DoubleResetDetector v1.2.0 FS File: /ConfigSW.json, size: 150B FS File: /CanadaFlag_1.png, size: 40.25KB FS File: /CanadaFlag_2.png, size: 8.12KB @@ -3619,8 +3644,8 @@ This is terminal debug output when running [ESP32_FSWebServer_DRD](examples/ESP3 ``` Starting ESP32_FSWebServer_DRD with DoubleResetDetect using LittleFS on ESP32_DEV -ESP_WiFiManager v1.7.5 -ESP_DoubleResetDetector v1.1.2 +ESP_WiFiManager v1.7.6 +ESP_DoubleResetDetector v1.2.0 FS File: /CanadaFlag_1.png, size: 40.25KB FS File: /CanadaFlag_2.png, size: 8.12KB FS File: /CanadaFlag_3.jpg, size: 10.89KB @@ -3678,8 +3703,8 @@ This is terminal debug output when running [ConfigOnDRD_FS_MQTT_Ptr_Complex](exa ``` Starting ConfigOnDRD_FS_MQTT_Ptr_Complex using LittleFS on ESP32_DEV -ESP_WiFiManager v1.7.5 -ESP_DoubleResetDetector v1.1.2 +ESP_WiFiManager v1.7.6 +ESP_DoubleResetDetector v1.2.0 {"AIO_KEY_Label":"aio_key","AIO_SERVER_Label":"io.adafruit.com","AIO_SERVERPORT_Label":"1883","AIO_USERNAME_Label":"user_name"} Config File successfully parsed LittleFS Flag read = 0xd0d04321 @@ -3721,8 +3746,8 @@ WWWW WTWWWW WWTWWW WWWTWW WWWWTW WWWWW ``` Starting ConfigOnDRD_FS_MQTT_Ptr_Complex using LittleFS on ESP32_DEV -ESP_WiFiManager v1.7.5 -ESP_DoubleResetDetector v1.1.2 +ESP_WiFiManager v1.7.6 +ESP_DoubleResetDetector v1.2.0 {"AIO_KEY_Label":"aio_key","AIO_SERVER_Label":"io.adafruit.com","AIO_SERVERPORT_Label":"1883","AIO_USERNAME_Label":"user_name"} Config File successfully parsed LittleFS Flag read = 0xd0d01234 @@ -3806,8 +3831,8 @@ This is terminal debug output when running [ConfigOnDRD_FS_MQTT_Ptr_Complex](exa ``` Starting ConfigOnDRD_FS_MQTT_Ptr_Medium using LittleFS on ESP8266_NODEMCU_ESP12E -ESP_WiFiManager v1.7.5 -ESP_DoubleResetDetector v1.1.2 +ESP_WiFiManager v1.7.6 +ESP_DoubleResetDetector v1.2.0 {"AIO_KEY_Label":"aio_key","AIO_SERVER_Label":"io.adafruit.com","AIO_SERVERPORT_Label":"1883","AIO_USERNAME_Label":"user_name"} Config File successfully parsed LittleFS Flag read = 0xd0d04321 @@ -3846,8 +3871,8 @@ TWWWW WTWWWW WWTWWW WWWTWW WWWWTW WWWWW ``` Starting ConfigOnDRD_FS_MQTT_Ptr_Medium using LittleFS on ESP8266_NODEMCU_ESP12E -ESP_WiFiManager v1.7.5 -ESP_DoubleResetDetector v1.1.2 +ESP_WiFiManager v1.7.6 +ESP_DoubleResetDetector v1.2.0 {"AIO_KEY_Label":"aio_key","AIO_SERVER_Label":"io.adafruit.com","AIO_SERVERPORT_Label":"1883","AIO_USERNAME_Label":"user_name"} Config File successfully parsed LittleFS Flag read = 0xd0d01234 @@ -3923,8 +3948,8 @@ This is terminal debug output when running [ConfigOnDoubleReset](examples/Config ``` Starting ConfigOnDoubleReset with DoubleResetDetect using LittleFS on ESP32S2_DEV -ESP_WiFiManager v1.7.5 -ESP_DoubleResetDetector v1.1.2 +ESP_WiFiManager v1.7.6 +ESP_DoubleResetDetector v1.2.0 [WM] RFC925 Hostname = ConfigOnDoubleReset [WM] setAPStaticIPConfig [WM] Set CORS Header to : Your Access-Control-Allow-Origin @@ -3973,8 +3998,8 @@ This is terminal debug output when running [ConfigOnDoubleReset](examples/Config ``` Starting ConfigOnDoubleReset with DoubleResetDetect using LittleFS on ESP32_DEV -ESP_WiFiManager v1.7.5 -ESP_DoubleResetDetector v1.1.2 +ESP_WiFiManager v1.7.6 +ESP_DoubleResetDetector v1.2.0 [WM] RFC925 Hostname = ConfigOnDoubleReset [WM] Set CORS Header to : Your Access-Control-Allow-Origin ESP Self-Stored: SSID = HueNet1, Pass = password @@ -4083,8 +4108,8 @@ Local Date/Time: Thu May 6 21:29:18 2021 ``` Starting ConfigOnDoubleReset with DoubleResetDetect using LittleFS on ESP32_DEV -ESP_WiFiManager v1.7.5 -ESP_DoubleResetDetector v1.1.2 +ESP_WiFiManager v1.7.6 +ESP_DoubleResetDetector v1.2.0 [WM] RFC925 Hostname = ConfigOnDoubleReset [WM] Set CORS Header to : Your Access-Control-Allow-Origin ESP Self-Stored: SSID = HueNet1, Pass = password @@ -4134,8 +4159,8 @@ This is terminal debug output when running [ConfigOnDoubleReset](examples/Config ``` Starting ConfigOnDoubleReset with DoubleResetDetect using LittleFS on ESP32S2_DEV -ESP_WiFiManager v1.7.5 -ESP_DoubleResetDetector v1.1.2 +ESP_WiFiManager v1.7.6 +ESP_DoubleResetDetector v1.2.0 [WM] RFC925 Hostname = ConfigOnDoubleReset [WM] Set CORS Header to : Your Access-Control-Allow-Origin ESP Self-Stored: SSID = HueNet1, Pass = password @@ -4280,8 +4305,8 @@ Local Date/Time: Thu May 6 21:29:18 2021 ``` Starting ConfigOnDoubleReset with DoubleResetDetect using LittleFS on ESP32S2_DEV -ESP_WiFiManager v1.7.5 -ESP_DoubleResetDetector v1.1.2 +ESP_WiFiManager v1.7.6 +ESP_DoubleResetDetector v1.2.0 [WM] RFC925 Hostname = ConfigOnDoubleReset [WM] Set CORS Header to : Your Access-Control-Allow-Origin ESP Self-Stored: SSID = HueNet1, Pass = password @@ -4333,8 +4358,8 @@ This is terminal debug output when running [ESP32_FSWebServer_DRD](examples/ESP3 ``` Starting ESP32_FSWebServer_DRD with DoubleResetDetect using SPIFFS on ESP32C3_DEV -ESP_WiFiManager v1.7.5 -ESP_DoubleResetDetector v1.1.2 +ESP_WiFiManager v1.7.6 +ESP_DoubleResetDetector v1.2.0 FS File: wm_cp.dat, size: 4B FS File: wm_cp.bak, size: 4B FS File: wmssl_conf.dat, size: 376B diff --git a/changelog.md b/changelog.md index 7e380bc..24faa26 100644 --- a/changelog.md +++ b/changelog.md @@ -13,6 +13,7 @@ ## Table of Contents * [Changelog](#changelog) + * [Releases v1.7.6](#releases-v176) * [Releases v1.7.5](#releases-v175) * [Releases v1.7.4](#releases-v174) * [Releases v1.7.3](#releases-v173) @@ -46,6 +47,11 @@ ## Changelog +### Releases v1.7.6 + +1. Auto detect ESP32 core and use either built-in LittleFS or [LITTLEFS](https://github.com/lorol/LITTLEFS) library +2. Update `library.json` to use new `headers` for PIO + ### Releases v1.7.5 1. Update `platform.ini` and `library.json` to use original `khoih-prog` instead of `khoih.prog` after PIO fix diff --git a/examples/AutoConnect/AutoConnect.ino b/examples/AutoConnect/AutoConnect.ino index 2a3f66b..301437d 100644 --- a/examples/AutoConnect/AutoConnect.ino +++ b/examples/AutoConnect/AutoConnect.ino @@ -15,7 +15,7 @@ #error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting. #endif -#define ESP_WIFIMANAGER_VERSION_MIN_TARGET "ESP_WiFiManager v1.7.3" +#define ESP_WIFIMANAGER_VERSION_MIN_TARGET "ESP_WiFiManager v1.7.6" // Use from 0 to 4. Higher number, more debugging messages and memory usage. #define _WIFIMGR_LOGLEVEL_ 3 @@ -44,12 +44,25 @@ // Use LittleFS #include "FS.h" - // The library has been merged into esp32 core release 1.0.6 - #include // https://github.com/lorol/LITTLEFS + // Check cores/esp32/esp_arduino_version.h + #if ( ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(2, 0, 0) ) //(ESP_ARDUINO_VERSION_MAJOR >= 2) + #warning Using ESP32 Core 1.0.6 or 2.0.0+ + // The library has been merged into esp32 core from release 1.0.6 + #include + + FS* filesystem = &LittleFS; + #define FileFS LittleFS + #define FS_Name "LittleFS" + #else + #warning Using ESP32 Core 1.0.4-. You must install LITTLEFS library + // The library has been merged into esp32 core from release 1.0.6 + #include // https://github.com/lorol/LITTLEFS + + FS* filesystem = &LITTLEFS; + #define FileFS LITTLEFS + #define FS_Name "LittleFS" + #endif - FS* filesystem = &LITTLEFS; - #define FileFS LITTLEFS - #define FS_Name "LittleFS" #elif USE_SPIFFS #include FS* filesystem = &SPIFFS; diff --git a/examples/AutoConnectWithFSParameters/AutoConnectWithFSParameters.ino b/examples/AutoConnectWithFSParameters/AutoConnectWithFSParameters.ino index 7d93e04..18558f3 100644 --- a/examples/AutoConnectWithFSParameters/AutoConnectWithFSParameters.ino +++ b/examples/AutoConnectWithFSParameters/AutoConnectWithFSParameters.ino @@ -15,7 +15,7 @@ #error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting. #endif -#define ESP_WIFIMANAGER_VERSION_MIN_TARGET "ESP_WiFiManager v1.7.3" +#define ESP_WIFIMANAGER_VERSION_MIN_TARGET "ESP_WiFiManager v1.7.6" // Use from 0 to 4. Higher number, more debugging messages and memory usage. #define _WIFIMGR_LOGLEVEL_ 3 @@ -46,12 +46,25 @@ // Use LittleFS #include "FS.h" - // The library has been merged into esp32 core release 1.0.6 - #include // https://github.com/lorol/LITTLEFS + // Check cores/esp32/esp_arduino_version.h + #if ( ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(2, 0, 0) ) //(ESP_ARDUINO_VERSION_MAJOR >= 2) + #warning Using ESP32 Core 1.0.6 or 2.0.0+ + // The library has been merged into esp32 core from release 1.0.6 + #include + + FS* filesystem = &LittleFS; + #define FileFS LittleFS + #define FS_Name "LittleFS" + #else + #warning Using ESP32 Core 1.0.4-. You must install LITTLEFS library + // The library has been merged into esp32 core from release 1.0.6 + #include // https://github.com/lorol/LITTLEFS + + FS* filesystem = &LITTLEFS; + #define FileFS LITTLEFS + #define FS_Name "LittleFS" + #endif - FS* filesystem = &LITTLEFS; - #define FileFS LITTLEFS - #define FS_Name "LittleFS" #elif USE_SPIFFS #include FS* filesystem = &SPIFFS; diff --git a/examples/AutoConnectWithFeedback/AutoConnectWithFeedback.ino b/examples/AutoConnectWithFeedback/AutoConnectWithFeedback.ino index 1ed4994..42def15 100644 --- a/examples/AutoConnectWithFeedback/AutoConnectWithFeedback.ino +++ b/examples/AutoConnectWithFeedback/AutoConnectWithFeedback.ino @@ -15,7 +15,7 @@ #error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting. #endif -#define ESP_WIFIMANAGER_VERSION_MIN_TARGET "ESP_WiFiManager v1.7.3" +#define ESP_WIFIMANAGER_VERSION_MIN_TARGET "ESP_WiFiManager v1.7.6" // Use from 0 to 4. Higher number, more debugging messages and memory usage. #define _WIFIMGR_LOGLEVEL_ 3 @@ -44,12 +44,25 @@ // Use LittleFS #include "FS.h" - // The library has been merged into esp32 core release 1.0.6 - #include // https://github.com/lorol/LITTLEFS + // Check cores/esp32/esp_arduino_version.h + #if ( ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(2, 0, 0) ) //(ESP_ARDUINO_VERSION_MAJOR >= 2) + #warning Using ESP32 Core 1.0.6 or 2.0.0+ + // The library has been merged into esp32 core from release 1.0.6 + #include + + FS* filesystem = &LittleFS; + #define FileFS LittleFS + #define FS_Name "LittleFS" + #else + #warning Using ESP32 Core 1.0.4-. You must install LITTLEFS library + // The library has been merged into esp32 core from release 1.0.6 + #include // https://github.com/lorol/LITTLEFS + + FS* filesystem = &LITTLEFS; + #define FileFS LITTLEFS + #define FS_Name "LittleFS" + #endif - FS* filesystem = &LITTLEFS; - #define FileFS LITTLEFS - #define FS_Name "LittleFS" #elif USE_SPIFFS #include FS* filesystem = &SPIFFS; diff --git a/examples/AutoConnectWithFeedbackLED/AutoConnectWithFeedbackLED.ino b/examples/AutoConnectWithFeedbackLED/AutoConnectWithFeedbackLED.ino index edce678..fb3b02c 100644 --- a/examples/AutoConnectWithFeedbackLED/AutoConnectWithFeedbackLED.ino +++ b/examples/AutoConnectWithFeedbackLED/AutoConnectWithFeedbackLED.ino @@ -15,7 +15,7 @@ #error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting. #endif -#define ESP_WIFIMANAGER_VERSION_MIN_TARGET "ESP_WiFiManager v1.7.3" +#define ESP_WIFIMANAGER_VERSION_MIN_TARGET "ESP_WiFiManager v1.7.6" // Use from 0 to 4. Higher number, more debugging messages and memory usage. #define _WIFIMGR_LOGLEVEL_ 3 @@ -46,12 +46,25 @@ // Use LittleFS #include "FS.h" - // The library has been merged into esp32 core release 1.0.6 - #include // https://github.com/lorol/LITTLEFS + // Check cores/esp32/esp_arduino_version.h + #if ( ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(2, 0, 0) ) //(ESP_ARDUINO_VERSION_MAJOR >= 2) + #warning Using ESP32 Core 1.0.6 or 2.0.0+ + // The library has been merged into esp32 core from release 1.0.6 + #include + + FS* filesystem = &LittleFS; + #define FileFS LittleFS + #define FS_Name "LittleFS" + #else + #warning Using ESP32 Core 1.0.4-. You must install LITTLEFS library + // The library has been merged into esp32 core from release 1.0.6 + #include // https://github.com/lorol/LITTLEFS + + FS* filesystem = &LITTLEFS; + #define FileFS LITTLEFS + #define FS_Name "LittleFS" + #endif - FS* filesystem = &LITTLEFS; - #define FileFS LITTLEFS - #define FS_Name "LittleFS" #elif USE_SPIFFS #include FS* filesystem = &SPIFFS; diff --git a/examples/ConfigOnDRD_FS_MQTT_Ptr/ConfigOnDRD_FS_MQTT_Ptr.ino b/examples/ConfigOnDRD_FS_MQTT_Ptr/ConfigOnDRD_FS_MQTT_Ptr.ino index cd3ccf4..d6e2044 100644 --- a/examples/ConfigOnDRD_FS_MQTT_Ptr/ConfigOnDRD_FS_MQTT_Ptr.ino +++ b/examples/ConfigOnDRD_FS_MQTT_Ptr/ConfigOnDRD_FS_MQTT_Ptr.ino @@ -31,7 +31,7 @@ #error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting. #endif -#define ESP_WIFIMANAGER_VERSION_MIN_TARGET "ESP_WiFiManager v1.7.3" +#define ESP_WIFIMANAGER_VERSION_MIN_TARGET "ESP_WiFiManager v1.7.6" // Use from 0 to 4. Higher number, more debugging messages and memory usage. #define _WIFIMGR_LOGLEVEL_ 3 @@ -69,12 +69,25 @@ // Use LittleFS #include "FS.h" - // The library has been merged into esp32 core release 1.0.6 - #include // https://github.com/lorol/LITTLEFS + // Check cores/esp32/esp_arduino_version.h + #if ( ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(2, 0, 0) ) //(ESP_ARDUINO_VERSION_MAJOR >= 2) + #warning Using ESP32 Core 1.0.6 or 2.0.0+ + // The library has been merged into esp32 core from release 1.0.6 + #include + + FS* filesystem = &LittleFS; + #define FileFS LittleFS + #define FS_Name "LittleFS" + #else + #warning Using ESP32 Core 1.0.4-. You must install LITTLEFS library + // The library has been merged into esp32 core from release 1.0.6 + #include // https://github.com/lorol/LITTLEFS + + FS* filesystem = &LITTLEFS; + #define FileFS LITTLEFS + #define FS_Name "LittleFS" + #endif - FS* filesystem = &LITTLEFS; - #define FileFS LITTLEFS - #define FS_Name "LittleFS" #elif USE_SPIFFS #include FS* filesystem = &SPIFFS; diff --git a/examples/ConfigOnDRD_FS_MQTT_Ptr_Complex/ConfigOnDRD_FS_MQTT_Ptr_Complex.ino b/examples/ConfigOnDRD_FS_MQTT_Ptr_Complex/ConfigOnDRD_FS_MQTT_Ptr_Complex.ino index 280f333..177c6ba 100644 --- a/examples/ConfigOnDRD_FS_MQTT_Ptr_Complex/ConfigOnDRD_FS_MQTT_Ptr_Complex.ino +++ b/examples/ConfigOnDRD_FS_MQTT_Ptr_Complex/ConfigOnDRD_FS_MQTT_Ptr_Complex.ino @@ -31,7 +31,7 @@ #error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting. #endif -#define ESP_WIFIMANAGER_VERSION_MIN_TARGET "ESP_WiFiManager v1.7.3" +#define ESP_WIFIMANAGER_VERSION_MIN_TARGET "ESP_WiFiManager v1.7.6" // Use from 0 to 4. Higher number, more debugging messages and memory usage. #define _WIFIMGR_LOGLEVEL_ 3 @@ -72,12 +72,25 @@ // Use LittleFS #include "FS.h" - // The library has been merged into esp32 core release 1.0.6 - #include // https://github.com/lorol/LITTLEFS + // Check cores/esp32/esp_arduino_version.h + #if ( ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(2, 0, 0) ) //(ESP_ARDUINO_VERSION_MAJOR >= 2) + #warning Using ESP32 Core 1.0.6 or 2.0.0+ + // The library has been merged into esp32 core from release 1.0.6 + #include + + FS* filesystem = &LittleFS; + #define FileFS LittleFS + #define FS_Name "LittleFS" + #else + #warning Using ESP32 Core 1.0.4-. You must install LITTLEFS library + // The library has been merged into esp32 core from release 1.0.6 + #include // https://github.com/lorol/LITTLEFS + + FS* filesystem = &LITTLEFS; + #define FileFS LITTLEFS + #define FS_Name "LittleFS" + #endif - FS* filesystem = &LITTLEFS; - #define FileFS LITTLEFS - #define FS_Name "LittleFS" #elif USE_SPIFFS #include FS* filesystem = &SPIFFS; diff --git a/examples/ConfigOnDRD_FS_MQTT_Ptr_Medium/ConfigOnDRD_FS_MQTT_Ptr_Medium.ino b/examples/ConfigOnDRD_FS_MQTT_Ptr_Medium/ConfigOnDRD_FS_MQTT_Ptr_Medium.ino index 3430c66..ba1c332 100644 --- a/examples/ConfigOnDRD_FS_MQTT_Ptr_Medium/ConfigOnDRD_FS_MQTT_Ptr_Medium.ino +++ b/examples/ConfigOnDRD_FS_MQTT_Ptr_Medium/ConfigOnDRD_FS_MQTT_Ptr_Medium.ino @@ -31,7 +31,7 @@ #error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting. #endif -#define ESP_WIFIMANAGER_VERSION_MIN_TARGET "ESP_WiFiManager v1.7.3" +#define ESP_WIFIMANAGER_VERSION_MIN_TARGET "ESP_WiFiManager v1.7.6" // Use from 0 to 4. Higher number, more debugging messages and memory usage. #define _WIFIMGR_LOGLEVEL_ 3 @@ -72,12 +72,25 @@ // Use LittleFS #include "FS.h" - // The library has been merged into esp32 core release 1.0.6 - #include // https://github.com/lorol/LITTLEFS + // Check cores/esp32/esp_arduino_version.h + #if ( ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(2, 0, 0) ) //(ESP_ARDUINO_VERSION_MAJOR >= 2) + #warning Using ESP32 Core 1.0.6 or 2.0.0+ + // The library has been merged into esp32 core from release 1.0.6 + #include + + FS* filesystem = &LittleFS; + #define FileFS LittleFS + #define FS_Name "LittleFS" + #else + #warning Using ESP32 Core 1.0.4-. You must install LITTLEFS library + // The library has been merged into esp32 core from release 1.0.6 + #include // https://github.com/lorol/LITTLEFS + + FS* filesystem = &LITTLEFS; + #define FileFS LITTLEFS + #define FS_Name "LittleFS" + #endif - FS* filesystem = &LITTLEFS; - #define FileFS LITTLEFS - #define FS_Name "LittleFS" #elif USE_SPIFFS #include FS* filesystem = &SPIFFS; diff --git a/examples/ConfigOnDoubleReset/ConfigOnDoubleReset.ino b/examples/ConfigOnDoubleReset/ConfigOnDoubleReset.ino index 922a8d8..e331856 100644 --- a/examples/ConfigOnDoubleReset/ConfigOnDoubleReset.ino +++ b/examples/ConfigOnDoubleReset/ConfigOnDoubleReset.ino @@ -42,7 +42,7 @@ #error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting. #endif -#define ESP_WIFIMANAGER_VERSION_MIN_TARGET "ESP_WiFiManager v1.7.3" +#define ESP_WIFIMANAGER_VERSION_MIN_TARGET "ESP_WiFiManager v1.7.6" // Use from 0 to 4. Higher number, more debugging messages and memory usage. #define _WIFIMGR_LOGLEVEL_ 4 @@ -73,12 +73,25 @@ // Use LittleFS #include "FS.h" - // The library has been merged into esp32 core release 1.0.6 - #include // https://github.com/lorol/LITTLEFS + // Check cores/esp32/esp_arduino_version.h + #if ( ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(2, 0, 0) ) //(ESP_ARDUINO_VERSION_MAJOR >= 2) + #warning Using ESP32 Core 1.0.6 or 2.0.0+ + // The library has been merged into esp32 core from release 1.0.6 + #include + + FS* filesystem = &LittleFS; + #define FileFS LittleFS + #define FS_Name "LittleFS" + #else + #warning Using ESP32 Core 1.0.4-. You must install LITTLEFS library + // The library has been merged into esp32 core from release 1.0.6 + #include // https://github.com/lorol/LITTLEFS + + FS* filesystem = &LITTLEFS; + #define FileFS LITTLEFS + #define FS_Name "LittleFS" + #endif - FS* filesystem = &LITTLEFS; - #define FileFS LITTLEFS - #define FS_Name "LittleFS" #elif USE_SPIFFS #include FS* filesystem = &SPIFFS; diff --git a/examples/ConfigOnStartup/ConfigOnStartup.ino b/examples/ConfigOnStartup/ConfigOnStartup.ino index 9709b02..c1760fc 100644 --- a/examples/ConfigOnStartup/ConfigOnStartup.ino +++ b/examples/ConfigOnStartup/ConfigOnStartup.ino @@ -33,7 +33,7 @@ #error This code is intended to run only on the ESP8266 and ESP32 boards ! Please check your Tools->Board setting. #endif -#define ESP_WIFIMANAGER_VERSION_MIN_TARGET "ESP_WiFiManager v1.7.3" +#define ESP_WIFIMANAGER_VERSION_MIN_TARGET "ESP_WiFiManager v1.7.6" // Use from 0 to 4. Higher number, more debugging messages and memory usage. #define _WIFIMGR_LOGLEVEL_ 3 @@ -64,12 +64,25 @@ // Use LittleFS #include "FS.h" - // The library has been merged into esp32 core release 1.0.6 - #include // https://github.com/lorol/LITTLEFS + // Check cores/esp32/esp_arduino_version.h + #if ( ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(2, 0, 0) ) //(ESP_ARDUINO_VERSION_MAJOR >= 2) + #warning Using ESP32 Core 1.0.6 or 2.0.0+ + // The library has been merged into esp32 core from release 1.0.6 + #include + + FS* filesystem = &LittleFS; + #define FileFS LittleFS + #define FS_Name "LittleFS" + #else + #warning Using ESP32 Core 1.0.4-. You must install LITTLEFS library + // The library has been merged into esp32 core from release 1.0.6 + #include // https://github.com/lorol/LITTLEFS + + FS* filesystem = &LITTLEFS; + #define FileFS LITTLEFS + #define FS_Name "LittleFS" + #endif - FS* filesystem = &LITTLEFS; - #define FileFS LITTLEFS - #define FS_Name "LittleFS" #elif USE_SPIFFS #include FS* filesystem = &SPIFFS; diff --git a/examples/ConfigOnSwitch/ConfigOnSwitch.ino b/examples/ConfigOnSwitch/ConfigOnSwitch.ino index 0c688a5..7ab790f 100644 --- a/examples/ConfigOnSwitch/ConfigOnSwitch.ino +++ b/examples/ConfigOnSwitch/ConfigOnSwitch.ino @@ -30,7 +30,7 @@ #error This code is intended to run only on the ESP8266 and ESP32 boards ! Please check your Tools->Board setting. #endif -#define ESP_WIFIMANAGER_VERSION_MIN_TARGET "ESP_WiFiManager v1.7.3" +#define ESP_WIFIMANAGER_VERSION_MIN_TARGET "ESP_WiFiManager v1.7.6" // Use from 0 to 4. Higher number, more debugging messages and memory usage. #define _WIFIMGR_LOGLEVEL_ 3 @@ -61,12 +61,25 @@ // Use LittleFS #include "FS.h" - // The library has been merged into esp32 core release 1.0.6 - #include // https://github.com/lorol/LITTLEFS + // Check cores/esp32/esp_arduino_version.h + #if ( ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(2, 0, 0) ) //(ESP_ARDUINO_VERSION_MAJOR >= 2) + #warning Using ESP32 Core 1.0.6 or 2.0.0+ + // The library has been merged into esp32 core from release 1.0.6 + #include + + FS* filesystem = &LittleFS; + #define FileFS LittleFS + #define FS_Name "LittleFS" + #else + #warning Using ESP32 Core 1.0.4-. You must install LITTLEFS library + // The library has been merged into esp32 core from release 1.0.6 + #include // https://github.com/lorol/LITTLEFS + + FS* filesystem = &LITTLEFS; + #define FileFS LITTLEFS + #define FS_Name "LittleFS" + #endif - FS* filesystem = &LITTLEFS; - #define FileFS LITTLEFS - #define FS_Name "LittleFS" #elif USE_SPIFFS #include FS* filesystem = &SPIFFS; diff --git a/examples/ConfigOnSwitchFS/ConfigOnSwitchFS.ino b/examples/ConfigOnSwitchFS/ConfigOnSwitchFS.ino index 05f6ecc..95d61d1 100644 --- a/examples/ConfigOnSwitchFS/ConfigOnSwitchFS.ino +++ b/examples/ConfigOnSwitchFS/ConfigOnSwitchFS.ino @@ -53,7 +53,7 @@ #error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting. #endif -#define ESP_WIFIMANAGER_VERSION_MIN_TARGET "ESP_WiFiManager v1.7.3" +#define ESP_WIFIMANAGER_VERSION_MIN_TARGET "ESP_WiFiManager v1.7.6" // Use from 0 to 4. Higher number, more debugging messages and memory usage. #define _WIFIMGR_LOGLEVEL_ 3 @@ -87,12 +87,25 @@ // Use LittleFS #include "FS.h" - // The library has been merged into esp32 core release 1.0.6 - #include // https://github.com/lorol/LITTLEFS + // Check cores/esp32/esp_arduino_version.h + #if ( ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(2, 0, 0) ) //(ESP_ARDUINO_VERSION_MAJOR >= 2) + #warning Using ESP32 Core 1.0.6 or 2.0.0+ + // The library has been merged into esp32 core from release 1.0.6 + #include + + FS* filesystem = &LittleFS; + #define FileFS LittleFS + #define FS_Name "LittleFS" + #else + #warning Using ESP32 Core 1.0.4-. You must install LITTLEFS library + // The library has been merged into esp32 core from release 1.0.6 + #include // https://github.com/lorol/LITTLEFS + + FS* filesystem = &LITTLEFS; + #define FileFS LITTLEFS + #define FS_Name "LittleFS" + #endif - FS* filesystem = &LITTLEFS; - #define FileFS LITTLEFS - #define FS_Name "LittleFS" #elif USE_SPIFFS #include FS* filesystem = &SPIFFS; diff --git a/examples/ConfigOnSwitchFS_MQTT_Ptr/ConfigOnSwitchFS_MQTT_Ptr.ino b/examples/ConfigOnSwitchFS_MQTT_Ptr/ConfigOnSwitchFS_MQTT_Ptr.ino index 6483f94..da35b71 100644 --- a/examples/ConfigOnSwitchFS_MQTT_Ptr/ConfigOnSwitchFS_MQTT_Ptr.ino +++ b/examples/ConfigOnSwitchFS_MQTT_Ptr/ConfigOnSwitchFS_MQTT_Ptr.ino @@ -35,7 +35,7 @@ #error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting. #endif -#define ESP_WIFIMANAGER_VERSION_MIN_TARGET "ESP_WiFiManager v1.7.3" +#define ESP_WIFIMANAGER_VERSION_MIN_TARGET "ESP_WiFiManager v1.7.6" // Use from 0 to 4. Higher number, more debugging messages and memory usage. #define _WIFIMGR_LOGLEVEL_ 3 @@ -73,12 +73,25 @@ // Use LittleFS #include "FS.h" - // The library has been merged into esp32 core release 1.0.6 - #include // https://github.com/lorol/LITTLEFS + // Check cores/esp32/esp_arduino_version.h + #if ( ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(2, 0, 0) ) //(ESP_ARDUINO_VERSION_MAJOR >= 2) + #warning Using ESP32 Core 1.0.6 or 2.0.0+ + // The library has been merged into esp32 core from release 1.0.6 + #include + + FS* filesystem = &LittleFS; + #define FileFS LittleFS + #define FS_Name "LittleFS" + #else + #warning Using ESP32 Core 1.0.4-. You must install LITTLEFS library + // The library has been merged into esp32 core from release 1.0.6 + #include // https://github.com/lorol/LITTLEFS + + FS* filesystem = &LITTLEFS; + #define FileFS LITTLEFS + #define FS_Name "LittleFS" + #endif - FS* filesystem = &LITTLEFS; - #define FileFS LITTLEFS - #define FS_Name "LittleFS" #elif USE_SPIFFS #include FS* filesystem = &SPIFFS; diff --git a/examples/ConfigPortalParamsOnSwitch/ConfigPortalParamsOnSwitch.ino b/examples/ConfigPortalParamsOnSwitch/ConfigPortalParamsOnSwitch.ino index 7220191..e09d52e 100644 --- a/examples/ConfigPortalParamsOnSwitch/ConfigPortalParamsOnSwitch.ino +++ b/examples/ConfigPortalParamsOnSwitch/ConfigPortalParamsOnSwitch.ino @@ -32,7 +32,7 @@ #error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting. #endif -#define ESP_WIFIMANAGER_VERSION_MIN_TARGET "ESP_WiFiManager v1.7.3" +#define ESP_WIFIMANAGER_VERSION_MIN_TARGET "ESP_WiFiManager v1.7.6" // Use from 0 to 4. Higher number, more debugging messages and memory usage. #define _WIFIMGR_LOGLEVEL_ 3 @@ -68,12 +68,25 @@ // Use LittleFS #include "FS.h" - // The library has been merged into esp32 core release 1.0.6 - #include // https://github.com/lorol/LITTLEFS + // Check cores/esp32/esp_arduino_version.h + #if ( ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(2, 0, 0) ) //(ESP_ARDUINO_VERSION_MAJOR >= 2) + #warning Using ESP32 Core 1.0.6 or 2.0.0+ + // The library has been merged into esp32 core from release 1.0.6 + #include + + FS* filesystem = &LittleFS; + #define FileFS LittleFS + #define FS_Name "LittleFS" + #else + #warning Using ESP32 Core 1.0.4-. You must install LITTLEFS library + // The library has been merged into esp32 core from release 1.0.6 + #include // https://github.com/lorol/LITTLEFS + + FS* filesystem = &LITTLEFS; + #define FileFS LITTLEFS + #define FS_Name "LittleFS" + #endif - FS* filesystem = &LITTLEFS; - #define FileFS LITTLEFS - #define FS_Name "LittleFS" #elif USE_SPIFFS #include FS* filesystem = &SPIFFS; diff --git a/examples/ESP32_FSWebServer/ESP32_FSWebServer.ino b/examples/ESP32_FSWebServer/ESP32_FSWebServer.ino index d7967b2..7969429 100644 --- a/examples/ESP32_FSWebServer/ESP32_FSWebServer.ino +++ b/examples/ESP32_FSWebServer/ESP32_FSWebServer.ino @@ -39,7 +39,7 @@ #error This code is intended to run on the ESP32 platform! Please check your Tools->Board setting. #endif -#define ESP_WIFIMANAGER_VERSION_MIN_TARGET "ESP_WiFiManager v1.7.3" +#define ESP_WIFIMANAGER_VERSION_MIN_TARGET "ESP_WiFiManager v1.7.6" // Use from 0 to 4. Higher number, more debugging messages and memory usage. #define _WIFIMGR_LOGLEVEL_ 3 @@ -72,12 +72,25 @@ WiFiMulti wifiMulti; // Use LittleFS #include "FS.h" - // The library has been merged into esp32 core release 1.0.6 - #include // https://github.com/lorol/LITTLEFS - - FS* filesystem = &LITTLEFS; - #define FileFS LITTLEFS - #define FS_Name "LittleFS" + // Check cores/esp32/esp_arduino_version.h + #if ( ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(2, 0, 0) ) //(ESP_ARDUINO_VERSION_MAJOR >= 2) + #warning Using ESP32 Core 1.0.6 or 2.0.0+ + // The library has been merged into esp32 core from release 1.0.6 + #include + + FS* filesystem = &LittleFS; + #define FileFS LittleFS + #define FS_Name "LittleFS" + #else + #warning Using ESP32 Core 1.0.4-. You must install LITTLEFS library + // The library has been merged into esp32 core from release 1.0.6 + #include // https://github.com/lorol/LITTLEFS + + FS* filesystem = &LITTLEFS; + #define FileFS LITTLEFS + #define FS_Name "LittleFS" + #endif + #elif USE_SPIFFS #include FS* filesystem = &SPIFFS; diff --git a/examples/ESP32_FSWebServer_DRD/ESP32_FSWebServer_DRD.ino b/examples/ESP32_FSWebServer_DRD/ESP32_FSWebServer_DRD.ino index badd310..5b33919 100644 --- a/examples/ESP32_FSWebServer_DRD/ESP32_FSWebServer_DRD.ino +++ b/examples/ESP32_FSWebServer_DRD/ESP32_FSWebServer_DRD.ino @@ -39,7 +39,7 @@ #error This code is intended to run on the ESP32 platform! Please check your Tools->Board setting. #endif -#define ESP_WIFIMANAGER_VERSION_MIN_TARGET "ESP_WiFiManager v1.7.3" +#define ESP_WIFIMANAGER_VERSION_MIN_TARGET "ESP_WiFiManager v1.7.6" // Use from 0 to 4. Higher number, more debugging messages and memory usage. #define _WIFIMGR_LOGLEVEL_ 3 @@ -106,12 +106,25 @@ DoubleResetDetector* drd; // Use LittleFS #include "FS.h" - // The library has been merged into esp32 core release 1.0.6 - #include // https://github.com/lorol/LITTLEFS - - FS* filesystem = &LITTLEFS; - #define FileFS LITTLEFS - #define FS_Name "LittleFS" + // Check cores/esp32/esp_arduino_version.h + #if ( ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(2, 0, 0) ) //(ESP_ARDUINO_VERSION_MAJOR >= 2) + #warning Using ESP32 Core 1.0.6 or 2.0.0+ + // The library has been merged into esp32 core from release 1.0.6 + #include + + FS* filesystem = &LittleFS; + #define FileFS LittleFS + #define FS_Name "LittleFS" + #else + #warning Using ESP32 Core 1.0.4-. You must install LITTLEFS library + // The library has been merged into esp32 core from release 1.0.6 + #include // https://github.com/lorol/LITTLEFS + + FS* filesystem = &LITTLEFS; + #define FileFS LITTLEFS + #define FS_Name "LittleFS" + #endif + #elif USE_SPIFFS #include FS* filesystem = &SPIFFS; diff --git a/examples/ESP_FSWebServer/ESP_FSWebServer.ino b/examples/ESP_FSWebServer/ESP_FSWebServer.ino index bbc83ff..73f0ec4 100644 --- a/examples/ESP_FSWebServer/ESP_FSWebServer.ino +++ b/examples/ESP_FSWebServer/ESP_FSWebServer.ino @@ -39,7 +39,7 @@ #error This code is intended to run on the ESP8266 platform! Please check your Tools->Board setting. #endif -#define ESP_WIFIMANAGER_VERSION_MIN_TARGET "ESP_WiFiManager v1.7.3" +#define ESP_WIFIMANAGER_VERSION_MIN_TARGET "ESP_WiFiManager v1.7.6" // Use from 0 to 4. Higher number, more debugging messages and memory usage. #define _WIFIMGR_LOGLEVEL_ 3 diff --git a/examples/ESP_FSWebServer_DRD/ESP_FSWebServer_DRD.ino b/examples/ESP_FSWebServer_DRD/ESP_FSWebServer_DRD.ino index a33c0ab..35fdbd6 100644 --- a/examples/ESP_FSWebServer_DRD/ESP_FSWebServer_DRD.ino +++ b/examples/ESP_FSWebServer_DRD/ESP_FSWebServer_DRD.ino @@ -39,7 +39,7 @@ #error This code is intended to run on the ESP8266 platform! Please check your Tools->Board setting. #endif -#define ESP_WIFIMANAGER_VERSION_MIN_TARGET "ESP_WiFiManager v1.7.3" +#define ESP_WIFIMANAGER_VERSION_MIN_TARGET "ESP_WiFiManager v1.7.6" // Use from 0 to 4. Higher number, more debugging messages and memory usage. #define _WIFIMGR_LOGLEVEL_ 3 diff --git a/library.json b/library.json index 7ade770..8c39413 100644 --- a/library.json +++ b/library.json @@ -1,8 +1,8 @@ { "name": "ESP_WifiManager", - "version": "1.7.5", + "version": "1.7.6", "keywords": "wifi, wi-fi, MultiWiFi, multi-wifi, WiFiManager, esp8266, esp32, esp32-s2, esp32-c3, Communication, iot, credentials, persistent, config-portal, DoubleReset, MultiReset, DoubleResetDetector, littlefs, spiffs, eeprom, dns-server", - "description": "Library to configure MultiWiFi/Credentials at runtime for ESP32 (including ESP32-S2 and ESP32-C3) and ESP8266 boards. With enhanced GUI and fallback web ConfigPortal. This Library is used for configuring ESP32 (including ESP32-S2 and ESP32-C3) and ESP8266 MultiWiFi Credentials at runtime. You can also specify static DNS servers, personalized HostName, DHCP HostName, static AP and STA IP, fixed or random AP channel. Now with MultiWiFi auto(Re)connect, configurable CORS Header and auto-Timezone features.", + "description": "Library to configure MultiWiFi/Credentials at runtime for ESP32 (including ESP32-S2 and ESP32-C3) and ESP8266 boards. With enhanced GUI and fallback web ConfigPortal. This Library is used for configuring ESP32 (including ESP32-S2 and ESP32-C3) and ESP8266 MultiWiFi Credentials at runtime. You can also specify static DNS servers, personalized HostName, DHCP HostName, static AP and STA IP, fixed or random AP channel. Now with MultiWiFi auto(Re)connect, configurable CORS Header and auto-Timezone features. Auto detect ESP32 core and use either built-in LittleFS or external LITTLEFS library", "authors": { "name": "Khoi Hoang", @@ -27,7 +27,7 @@ { "owner": "khoih-prog", "name": "ESP_DoubleResetDetector", - "version": ">=1.1.2", + "version": ">=1.2.0", "platforms": ["espressif8266", "espressif32"] }, { @@ -39,5 +39,6 @@ ], "frameworks": "*", "platforms": ["espressif8266", "espressif32"], - "examples": "examples/*/*/*.ino" + "examples": "examples/*/*/*.ino", + "headers": "ESP_WiFiManager.h" } diff --git a/library.properties b/library.properties index 56203c4..ff6a522 100644 --- a/library.properties +++ b/library.properties @@ -1,10 +1,10 @@ name=ESP_WiFiManager -version=1.7.5 +version=1.7.6 author=Khoi Hoang maintainer=Khoi Hoang license=MIT sentence=Library to configure MultiWiFi/Credentials at runtime for ESP32 (including ESP32-S2 and ESP32-C3) and ESP8266 boards. With enhanced GUI and fallback web ConfigPortal. -paragraph=Library to configure MultiWiFi/Credentials at runtime for ESP32 (including ESP32-S2 and ESP32-C3) and ESP8266 boards. With enhanced GUI and fallback web ConfigPortal. This Library is used for configuring ESP32 (including ESP32-S2 and ESP32-C3) and ESP8266 MultiWiFi Credentials at runtime. You can also specify static DNS servers, personalized HostName, DHCP HostName, static AP and STA IP, fixed or random AP channel. Now with MultiWiFi auto(Re)connect, configurable CORS Header and auto-Timezone features +paragraph=Library to configure MultiWiFi/Credentials at runtime for ESP32 (including ESP32-S2 and ESP32-C3) and ESP8266 boards. With enhanced GUI and fallback web ConfigPortal. This Library is used for configuring ESP32 (including ESP32-S2 and ESP32-C3) and ESP8266 MultiWiFi Credentials at runtime. You can also specify static DNS servers, personalized HostName, DHCP HostName, static AP and STA IP, fixed or random AP channel. Now with MultiWiFi auto(Re)connect, configurable CORS Header and auto-Timezone features. Auto detect ESP32 core and use either built-in LittleFS or external LITTLEFS library category=Communication url=https://github.com/khoih-prog/ESP_WiFiManager architectures=esp8266,esp32 diff --git a/platformio/platformio.ini b/platformio/platformio.ini index fa71847..36cf890 100644 --- a/platformio/platformio.ini +++ b/platformio/platformio.ini @@ -32,11 +32,11 @@ lib_compat_mode = strict lib_deps = ; PlatformIO 4.x -; ESP_DoubleResetDetector@>=1.1.2 +; ESP_DoubleResetDetector@>=1.2.0 ; LittleFS_esp32@>=1.0.6 ; PlatformIO 5.x - khoih-prog/ESP_DoubleResetDetector@>=1.1.2 -; lorol/LittleFS_esp32@>=1.0.6 + khoih-prog/ESP_DoubleResetDetector@>=1.2.0 + lorol/LittleFS_esp32@>=1.0.6 build_flags = ; set your debug output (default=Serial) diff --git a/src/ESP_WiFiManager-Impl.h b/src/ESP_WiFiManager-Impl.h index 516342b..34d20ab 100644 --- a/src/ESP_WiFiManager-Impl.h +++ b/src/ESP_WiFiManager-Impl.h @@ -15,7 +15,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/ESP_WiFiManager Licensed under MIT license - Version: 1.7.5 + Version: 1.7.6 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -52,6 +52,7 @@ 1.7.3 K Hoang 29/07/2021 Fix MultiWiFi connection issue with ESP32 core v2.0.0-rc1+ 1.7.4 K Hoang 13/08/2021 Add WiFi scanning of hidden SSIDs 1.7.5 K Hoang 10/10/2021 Update `platform.ini` and `library.json` + 1.7.6 K Hoang 26/11/2021 Auto detect ESP32 core and use either built-in LittleFS or LITTLEFS library *****************************************************************************************************************************/ #pragma once diff --git a/src/ESP_WiFiManager.h b/src/ESP_WiFiManager.h index 8f14223..d90c723 100644 --- a/src/ESP_WiFiManager.h +++ b/src/ESP_WiFiManager.h @@ -15,7 +15,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/ESP_WiFiManager Licensed under MIT license - Version: 1.7.5 + Version: 1.7.6 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -52,6 +52,7 @@ 1.7.3 K Hoang 29/07/2021 Fix MultiWiFi connection issue with ESP32 core v2.0.0-rc1+ 1.7.4 K Hoang 13/08/2021 Add WiFi scanning of hidden SSIDs 1.7.5 K Hoang 10/10/2021 Update `platform.ini` and `library.json` + 1.7.6 K Hoang 26/11/2021 Auto detect ESP32 core and use either built-in LittleFS or LITTLEFS library *****************************************************************************************************************************/ #pragma once @@ -73,7 +74,7 @@ #define USING_ESP32_C3 true #endif -#define ESP_WIFIMANAGER_VERSION "ESP_WiFiManager v1.7.5" +#define ESP_WIFIMANAGER_VERSION "ESP_WiFiManager v1.7.6" #include "ESP_WiFiManager_Debug.h" diff --git a/src/ESP_WiFiManager_Debug.h b/src/ESP_WiFiManager_Debug.h index 6c7929d..5a39fd5 100644 --- a/src/ESP_WiFiManager_Debug.h +++ b/src/ESP_WiFiManager_Debug.h @@ -15,7 +15,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/ESP_WiFiManager Licensed under MIT license - Version: 1.7.5 + Version: 1.7.6 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -52,6 +52,7 @@ 1.7.3 K Hoang 29/07/2021 Fix MultiWiFi connection issue with ESP32 core v2.0.0-rc1+ 1.7.4 K Hoang 13/08/2021 Add WiFi scanning of hidden SSIDs 1.7.5 K Hoang 10/10/2021 Update `platform.ini` and `library.json` + 1.7.6 K Hoang 26/11/2021 Auto detect ESP32 core and use either built-in LittleFS or LITTLEFS library *****************************************************************************************************************************/ #pragma once diff --git a/src_cpp/ESP_WiFiManager.cpp b/src_cpp/ESP_WiFiManager.cpp index 51ebc77..2369504 100644 --- a/src_cpp/ESP_WiFiManager.cpp +++ b/src_cpp/ESP_WiFiManager.cpp @@ -15,7 +15,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/ESP_WiFiManager Licensed under MIT license - Version: 1.7.5 + Version: 1.7.6 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -52,6 +52,7 @@ 1.7.3 K Hoang 29/07/2021 Fix MultiWiFi connection issue with ESP32 core v2.0.0-rc1+ 1.7.4 K Hoang 13/08/2021 Add WiFi scanning of hidden SSIDs 1.7.5 K Hoang 10/10/2021 Update `platform.ini` and `library.json` + 1.7.6 K Hoang 26/11/2021 Auto detect ESP32 core and use either built-in LittleFS or LITTLEFS library *****************************************************************************************************************************/ #include "ESP_WiFiManager.h" diff --git a/src_cpp/ESP_WiFiManager.h b/src_cpp/ESP_WiFiManager.h index 763dac9..56a4603 100644 --- a/src_cpp/ESP_WiFiManager.h +++ b/src_cpp/ESP_WiFiManager.h @@ -15,7 +15,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/ESP_WiFiManager Licensed under MIT license - Version: 1.7.5 + Version: 1.7.6 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -52,6 +52,7 @@ 1.7.3 K Hoang 29/07/2021 Fix MultiWiFi connection issue with ESP32 core v2.0.0-rc1+ 1.7.4 K Hoang 13/08/2021 Add WiFi scanning of hidden SSIDs 1.7.5 K Hoang 10/10/2021 Update `platform.ini` and `library.json` + 1.7.6 K Hoang 26/11/2021 Auto detect ESP32 core and use either built-in LittleFS or LITTLEFS library *****************************************************************************************************************************/ #pragma once @@ -73,7 +74,7 @@ #define USING_ESP32_C3 true #endif -#define ESP_WIFIMANAGER_VERSION "ESP_WiFiManager v1.7.5" +#define ESP_WIFIMANAGER_VERSION "ESP_WiFiManager v1.7.6" #include "ESP_WiFiManager_Debug.h" diff --git a/src_cpp/ESP_WiFiManager_Debug.h b/src_cpp/ESP_WiFiManager_Debug.h index 6c7929d..5a39fd5 100644 --- a/src_cpp/ESP_WiFiManager_Debug.h +++ b/src_cpp/ESP_WiFiManager_Debug.h @@ -15,7 +15,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/ESP_WiFiManager Licensed under MIT license - Version: 1.7.5 + Version: 1.7.6 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -52,6 +52,7 @@ 1.7.3 K Hoang 29/07/2021 Fix MultiWiFi connection issue with ESP32 core v2.0.0-rc1+ 1.7.4 K Hoang 13/08/2021 Add WiFi scanning of hidden SSIDs 1.7.5 K Hoang 10/10/2021 Update `platform.ini` and `library.json` + 1.7.6 K Hoang 26/11/2021 Auto detect ESP32 core and use either built-in LittleFS or LITTLEFS library *****************************************************************************************************************************/ #pragma once diff --git a/src_h/ESP_WiFiManager-Impl.h b/src_h/ESP_WiFiManager-Impl.h index 516342b..34d20ab 100644 --- a/src_h/ESP_WiFiManager-Impl.h +++ b/src_h/ESP_WiFiManager-Impl.h @@ -15,7 +15,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/ESP_WiFiManager Licensed under MIT license - Version: 1.7.5 + Version: 1.7.6 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -52,6 +52,7 @@ 1.7.3 K Hoang 29/07/2021 Fix MultiWiFi connection issue with ESP32 core v2.0.0-rc1+ 1.7.4 K Hoang 13/08/2021 Add WiFi scanning of hidden SSIDs 1.7.5 K Hoang 10/10/2021 Update `platform.ini` and `library.json` + 1.7.6 K Hoang 26/11/2021 Auto detect ESP32 core and use either built-in LittleFS or LITTLEFS library *****************************************************************************************************************************/ #pragma once diff --git a/src_h/ESP_WiFiManager.h b/src_h/ESP_WiFiManager.h index 8f14223..d90c723 100644 --- a/src_h/ESP_WiFiManager.h +++ b/src_h/ESP_WiFiManager.h @@ -15,7 +15,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/ESP_WiFiManager Licensed under MIT license - Version: 1.7.5 + Version: 1.7.6 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -52,6 +52,7 @@ 1.7.3 K Hoang 29/07/2021 Fix MultiWiFi connection issue with ESP32 core v2.0.0-rc1+ 1.7.4 K Hoang 13/08/2021 Add WiFi scanning of hidden SSIDs 1.7.5 K Hoang 10/10/2021 Update `platform.ini` and `library.json` + 1.7.6 K Hoang 26/11/2021 Auto detect ESP32 core and use either built-in LittleFS or LITTLEFS library *****************************************************************************************************************************/ #pragma once @@ -73,7 +74,7 @@ #define USING_ESP32_C3 true #endif -#define ESP_WIFIMANAGER_VERSION "ESP_WiFiManager v1.7.5" +#define ESP_WIFIMANAGER_VERSION "ESP_WiFiManager v1.7.6" #include "ESP_WiFiManager_Debug.h" diff --git a/src_h/ESP_WiFiManager_Debug.h b/src_h/ESP_WiFiManager_Debug.h index 6c7929d..5a39fd5 100644 --- a/src_h/ESP_WiFiManager_Debug.h +++ b/src_h/ESP_WiFiManager_Debug.h @@ -15,7 +15,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/ESP_WiFiManager Licensed under MIT license - Version: 1.7.5 + Version: 1.7.6 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -52,6 +52,7 @@ 1.7.3 K Hoang 29/07/2021 Fix MultiWiFi connection issue with ESP32 core v2.0.0-rc1+ 1.7.4 K Hoang 13/08/2021 Add WiFi scanning of hidden SSIDs 1.7.5 K Hoang 10/10/2021 Update `platform.ini` and `library.json` + 1.7.6 K Hoang 26/11/2021 Auto detect ESP32 core and use either built-in LittleFS or LITTLEFS library *****************************************************************************************************************************/ #pragma once