move apcallback to proper location

This was actually being called before the ap was setup!
This commit is contained in:
Shawn A
2017-02-10 15:21:48 -06:00
parent 65349cb546
commit 1a44dd53e6
+6 -5
View File
@@ -114,6 +114,12 @@ bool WiFiManager::startAP(){
delay(500); // slight delay to make sure we have an AP IP
DEBUG_WM(F("AP IP address: "));
DEBUG_WM(WiFi.softAPIP());
// do AP callback if set
if ( _apcallback != NULL) {
_apcallback(this);
}
return ret;
}
@@ -195,11 +201,6 @@ boolean WiFiManager::startConfigPortal(char const *apName, char const *apPasswo
_apPassword = apPassword;
if(!validApPassword()) return false;
// do AP callback if set
if ( _apcallback != NULL) {
_apcallback(this);
}
connect = false; // global
// init configportal