Since I do not know how to fix the delegated constructors properly, this should fix the issue for now
This commit is contained in:
tablatronix
2018-03-03 10:33:04 -06:00
parent 5ae132a7e9
commit 53df6ac612
2 changed files with 9 additions and 3 deletions
+8 -3
View File
@@ -133,12 +133,16 @@ bool WiFiManager::addParameter(WiFiManagerParameter *p) {
**/
// constructors
WiFiManager::WiFiManager(Stream& consolePort):_debugPort(consolePort) {
WiFiManager();
WiFiManager::WiFiManager(Stream& consolePort):WiFiManager(),_debugPort(consolePort){
WiFiManagerInit();
}
WiFiManager::WiFiManager():_debugPort(Serial) {
if(_debug && _debugLevel > 2) debugPlatformInfo();
WiFiManagerInit();
}
void WiFiManager::WiFiManagerInit(){
// if(_debug && _debugLevel > 2) debugPlatformInfo();
_usermode = WiFi.getMode();
WiFi.persistent(false); // disable persistent so scannetworks and mode switching do not cause overwrites
@@ -146,6 +150,7 @@ WiFiManager::WiFiManager():_debugPort(Serial) {
//parameters
// @todo belongs to wifimanagerparameter
_max_params = WIFI_MANAGER_MAX_PARAMS;
DEBUG_WM("allocating",_max_params * sizeof(WiFiManagerParameter*));
_params = (WiFiManagerParameter**)malloc(_max_params * sizeof(WiFiManagerParameter*));
}
+1
View File
@@ -110,6 +110,7 @@ class WiFiManager
WiFiManager(Stream& consolePort);
WiFiManager();
~WiFiManager();
void WiFiManagerInit();
typedef enum {
MENU_WIFI = 0,