From 2a0ac55f87f66485c880c69695e1cefd706cc9f9 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Tue, 22 Nov 2016 12:50:55 +0200 Subject: [PATCH 1/4] Update platforms compatibility --- library.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library.json b/library.json index d840d3c..44400f6 100644 --- a/library.json +++ b/library.json @@ -8,6 +8,6 @@ "url": "https://github.com/tzapu/WiFiManager.git" }, "frameworks": "arduino", - "platforms": "espressif", + "platforms": "espressif8266", "version": "0.12" } From a231ae5deb4ee3d3b67a5d28f9c80a4286e018c7 Mon Sep 17 00:00:00 2001 From: Robert Oostenveld Date: Sat, 7 Jan 2017 22:10:00 +0100 Subject: [PATCH 2/4] use setAPStaticIPConfig instead of (old?) setAPConfig in first example --- examples/AutoConnect/AutoConnect.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/AutoConnect/AutoConnect.ino b/examples/AutoConnect/AutoConnect.ino index 37ff392..0c44909 100644 --- a/examples/AutoConnect/AutoConnect.ino +++ b/examples/AutoConnect/AutoConnect.ino @@ -17,7 +17,7 @@ void setup() { //wifiManager.resetSettings(); //set custom ip for portal - //wifiManager.setAPConfig(IPAddress(10,0,1,1), IPAddress(10,0,1,1), IPAddress(255,255,255,0)); + //wifiManager.setAPStaticIPConfig(IPAddress(10,0,1,1), IPAddress(10,0,1,1), IPAddress(255,255,255,0)); //fetches ssid and pass from eeprom and tries to connect //if it does not connect it starts an access point with the specified name From 1f500fddd1348daffcc27b61f1e53a2f3fbc611d Mon Sep 17 00:00:00 2001 From: Alex Goris Date: Sun, 8 Jan 2017 23:31:53 +0100 Subject: [PATCH 3/4] Don't add custom parameters if array size is exceeded array containing custom parameters is initialised at class initialization time with a fixed value. When we later try to add more parameters than the array allows we will now discard the offending parameters and make a debug logging so the developer knows what's going on. Might be further improved as per this answer on StackOverflow: http://stackoverflow.com/a/12271501 This would allow the array size to be specified at initialisation time, and would give flexibility to the developer to decide how big the array should be. closes tzapu/WiFiManager#285 --- WiFiManager.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/WiFiManager.cpp b/WiFiManager.cpp index 93bf578..06e7481 100644 --- a/WiFiManager.cpp +++ b/WiFiManager.cpp @@ -64,6 +64,14 @@ WiFiManager::WiFiManager() { } void WiFiManager::addParameter(WiFiManagerParameter *p) { + if(_paramsCount + 1 > WIFI_MANAGER_MAX_PARAMS) + { + //Max parameters exceeded! + DEBUG_WM("WIFI_MANAGER_MAX_PARAMS exceeded, increase number (in WiFiManager.h) before adding more parameters!"); + DEBUG_WM("Skipping parameter with ID:"); + DEBUG_WM(p->getID()); + return; + } _params[_paramsCount] = p; _paramsCount++; DEBUG_WM("Adding parameter"); From bd0da6c7a689b04a3436ae0292e18764d88333dc Mon Sep 17 00:00:00 2001 From: Jorge Cisneros Date: Mon, 16 Jan 2017 22:48:09 -0600 Subject: [PATCH 4/4] Quotes are missing creating issues. --- extras/WiFiManager.template.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extras/WiFiManager.template.html b/extras/WiFiManager.template.html index d510e9c..e15593b 100644 --- a/extras/WiFiManager.template.html +++ b/extras/WiFiManager.template.html @@ -58,7 +58,7 @@


-
+