mirror of
https://github.com/alexhopeoconnor/WiFiManager.git
synced 2026-10-13 14:51:21 +10:00
To show the config portal SSID in the callback, a global reference to the WiFiManager object was needed. To solve this, a pointer to the WiFiManager object is now passed to the callback. The feedback example is edited accordingly.
This commit is contained in:
+2
-2
@@ -133,7 +133,7 @@ boolean WiFiManager::startConfigPortal(char const *apName, char const *apPasswo
|
||||
|
||||
//notify we entered AP mode
|
||||
if ( _apcallback != NULL) {
|
||||
_apcallback();
|
||||
_apcallback(this);
|
||||
}
|
||||
|
||||
connect = false;
|
||||
@@ -463,7 +463,7 @@ boolean WiFiManager::captivePortal() {
|
||||
}
|
||||
|
||||
//start up config portal callback
|
||||
void WiFiManager::setAPCallback( void (*func)(void) ) {
|
||||
void WiFiManager::setAPCallback( void (*func)(WiFiManager* myWiFiManager) ) {
|
||||
_apcallback = func;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user