From 1a44dd53e63b94b94f0b6be9e9a94639d0969754 Mon Sep 17 00:00:00 2001 From: Shawn A Date: Fri, 10 Feb 2017 15:21:48 -0600 Subject: [PATCH] move apcallback to proper location This was actually being called before the ap was setup! --- WiFiManager.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/WiFiManager.cpp b/WiFiManager.cpp index ec2c806..cf6d397 100644 --- a/WiFiManager.cpp +++ b/WiFiManager.cpp @@ -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