mirror of
https://github.com/alexhopeoconnor/WiFiManager.git
synced 2026-10-16 16:01:36 +10:00
comments
This commit is contained in:
+14
-1
@@ -12,7 +12,11 @@
|
||||
|
||||
#include "WiFiManager.h"
|
||||
|
||||
// PARAMETERS
|
||||
/**
|
||||
* --------------------------------------------------------------------------------
|
||||
* WiFIManagerParameter
|
||||
* --------------------------------------------------------------------------------
|
||||
**/
|
||||
|
||||
WiFiManagerParameter::WiFiManagerParameter(const char *custom) {
|
||||
_id = NULL;
|
||||
@@ -107,6 +111,12 @@ bool WiFiManager::addParameter(WiFiManagerParameter *p) {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------------
|
||||
* WiFIManager
|
||||
* --------------------------------------------------------------------------------
|
||||
**/
|
||||
|
||||
// constructors
|
||||
WiFiManager::WiFiManager(Stream& consolePort):_debugPort(consolePort) {
|
||||
WiFiManager();
|
||||
@@ -118,6 +128,7 @@ WiFiManager::WiFiManager():_debugPort(Serial) {
|
||||
WiFi.persistent(false); // disable persistent so scannetworks and mode switching do not cause overwrites
|
||||
|
||||
//parameters
|
||||
// @todo belongs to wifimanagerparameter
|
||||
_max_params = WIFI_MANAGER_MAX_PARAMS;
|
||||
_params = (WiFiManagerParameter**)malloc(_max_params * sizeof(WiFiManagerParameter*));
|
||||
}
|
||||
@@ -128,10 +139,12 @@ WiFiManager::~WiFiManager() {
|
||||
WiFi.mode(_usermode);
|
||||
|
||||
// parameters
|
||||
// @todo belongs to wifimanagerparameter
|
||||
if (_params != NULL){
|
||||
DEBUG_WM(F("freeing allocated params!"));
|
||||
free(_params);
|
||||
}
|
||||
|
||||
DEBUG_WM(F("unloading"));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user