Merge pull request #718 from fllaca/get_parameters_method

Implements #717:  Added getParameters and getParametersCount methods.
This commit is contained in:
Shawn A
2018-10-03 10:29:45 -05:00
committed by GitHub
7 changed files with 21 additions and 1 deletions
+1 -1
View File
@@ -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
+16
View File
@@ -148,6 +148,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
+4
View File
@@ -200,6 +200,10 @@ class WiFiManager
void setSaveConfigCallback( std::function<void()> 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,