From b4cc27cb56e6908f3a9cc28f4b8f3f04252e56dc Mon Sep 17 00:00:00 2001 From: Fernando Llaca Date: Sun, 2 Sep 2018 21:11:59 +0200 Subject: [PATCH 1/4] Added getParameters and getParametersCount methods. Useful for iterating over WiFiManager parameter list --- WiFiManager.cpp | 16 ++++++++++++++++ WiFiManager.h | 4 ++++ 2 files changed, 20 insertions(+) diff --git a/WiFiManager.cpp b/WiFiManager.cpp index 2cb5dd4..4eb540b 100644 --- a/WiFiManager.cpp +++ b/WiFiManager.cpp @@ -150,6 +150,22 @@ bool WiFiManager::addParameter(WiFiManagerParameter *p) { return true; } +/** + * [getParameters description] + * @access public + */ +WiFiManagerParameter** WiFiManager::getParameters() { + return _params; +} + +/** + * [getParametersCount description] + * @access public + */ +int WiFiManager::getParametersCount() { + return _paramsCount; +} + /** * -------------------------------------------------------------------------------- * WiFiManager diff --git a/WiFiManager.h b/WiFiManager.h index 262189f..3fe03f3 100644 --- a/WiFiManager.h +++ b/WiFiManager.h @@ -198,6 +198,10 @@ class WiFiManager void setSaveConfigCallback( std::function func ); //adds a custom parameter, returns false on failure bool addParameter(WiFiManagerParameter *p); + //returns the list of Parameters + WiFiManagerParameter** getParameters(); + // returns the Parameters Count + int getParametersCount(); //if this is set, it will exit after config, even if connection is unsuccessful. void setBreakAfterConfig(boolean shouldBreak); // if this is set, portal will be blocking and wait until save or exit, From 448e079bc8584ce735504e1aa3538806f44b258b Mon Sep 17 00:00:00 2001 From: Fernando Llaca Date: Sun, 16 Sep 2018 22:49:40 +0200 Subject: [PATCH 2/4] Use a especific version of ArduinoJson --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ca2ba85..d41a13b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,7 @@ before_install: install: - ln -s $PWD /usr/local/share/arduino/libraries/WiFiManager - arduino --pref "boardsmanager.additional.urls=http://arduino.esp8266.com/stable/package_esp8266com_index.json" --save-prefs - - arduino --install-library "ArduinoJson" + - arduino --install-library "ArduinoJson:5.13.2" - arduino --install-boards esp8266:esp8266 - arduino --pref "compiler.warning_level=all" --save-prefs # install esp32 From 12fc6516d2729a3ce1afb5b08d671066d15f3c89 Mon Sep 17 00:00:00 2001 From: Fernando Llaca Date: Sun, 16 Sep 2018 22:57:01 +0200 Subject: [PATCH 3/4] Missing semicolon --- examples/OnDemand/OnDemandWebPortal/onDemandWebPortal.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/OnDemand/OnDemandWebPortal/onDemandWebPortal.ino b/examples/OnDemand/OnDemandWebPortal/onDemandWebPortal.ino index 5850e40..d3cbe3f 100644 --- a/examples/OnDemand/OnDemandWebPortal/onDemandWebPortal.ino +++ b/examples/OnDemand/OnDemandWebPortal/onDemandWebPortal.ino @@ -31,7 +31,7 @@ void checkButton(){ // is configuration portal requested? if(digitalRead(TRIGGER_PIN) == LOW) { - delay(50) + delay(50); if(digitalRead(TRIGGER_PIN) == LOW) { if(!portalRunning){ Serial.println("Button Pressed, Starting Portal"); From 1c191c1d14674397bc7f89e8f85303fe459bb89d Mon Sep 17 00:00:00 2001 From: Fernando Llaca Date: Sun, 16 Sep 2018 23:08:23 +0200 Subject: [PATCH 4/4] Rename "Old Examples" folder to "Old_Examples", to avoid errors when iterating examples folder. --- .../AutoConnectWithFeedback/AutoConnectWithFeedback.ino | 0 .../AutoConnectWithReset/AutoConnectWithReset.ino | 0 .../AutoConnectWithStaticIP/AutoConnectWithStaticIP.ino | 0 .../AutoConnectWithTimeout/AutoConnectWithTimeout.ino | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename examples/{Old Examples => Old_examples}/AutoConnectWithFeedback/AutoConnectWithFeedback.ino (100%) rename examples/{Old Examples => Old_examples}/AutoConnectWithReset/AutoConnectWithReset.ino (100%) rename examples/{Old Examples => Old_examples}/AutoConnectWithStaticIP/AutoConnectWithStaticIP.ino (100%) rename examples/{Old Examples => Old_examples}/AutoConnectWithTimeout/AutoConnectWithTimeout.ino (100%) diff --git a/examples/Old Examples/AutoConnectWithFeedback/AutoConnectWithFeedback.ino b/examples/Old_examples/AutoConnectWithFeedback/AutoConnectWithFeedback.ino similarity index 100% rename from examples/Old Examples/AutoConnectWithFeedback/AutoConnectWithFeedback.ino rename to examples/Old_examples/AutoConnectWithFeedback/AutoConnectWithFeedback.ino diff --git a/examples/Old Examples/AutoConnectWithReset/AutoConnectWithReset.ino b/examples/Old_examples/AutoConnectWithReset/AutoConnectWithReset.ino similarity index 100% rename from examples/Old Examples/AutoConnectWithReset/AutoConnectWithReset.ino rename to examples/Old_examples/AutoConnectWithReset/AutoConnectWithReset.ino diff --git a/examples/Old Examples/AutoConnectWithStaticIP/AutoConnectWithStaticIP.ino b/examples/Old_examples/AutoConnectWithStaticIP/AutoConnectWithStaticIP.ino similarity index 100% rename from examples/Old Examples/AutoConnectWithStaticIP/AutoConnectWithStaticIP.ino rename to examples/Old_examples/AutoConnectWithStaticIP/AutoConnectWithStaticIP.ino diff --git a/examples/Old Examples/AutoConnectWithTimeout/AutoConnectWithTimeout.ino b/examples/Old_examples/AutoConnectWithTimeout/AutoConnectWithTimeout.ino similarity index 100% rename from examples/Old Examples/AutoConnectWithTimeout/AutoConnectWithTimeout.ino rename to examples/Old_examples/AutoConnectWithTimeout/AutoConnectWithTimeout.ino