mirror of
https://github.com/alexhopeoconnor/WiFiManager.git
synced 2026-10-13 23:01:20 +10:00
#546 fix?
Since I do not know how to fix the delegated constructors properly, this should fix the issue for now
This commit is contained in:
+8
-3
@@ -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*));
|
||||
}
|
||||
|
||||
|
||||
@@ -110,6 +110,7 @@ class WiFiManager
|
||||
WiFiManager(Stream& consolePort);
|
||||
WiFiManager();
|
||||
~WiFiManager();
|
||||
void WiFiManagerInit();
|
||||
|
||||
typedef enum {
|
||||
MENU_WIFI = 0,
|
||||
|
||||
Reference in New Issue
Block a user