add check to dissallow starting cp if already running

This will avoid support inquiries and add a log
This commit is contained in:
tablatronix
2022-03-13 21:34:26 -05:00
parent 1f3b2e34ae
commit d70f358f3e
+7
View File
@@ -657,6 +657,13 @@ boolean WiFiManager::startConfigPortal() {
boolean WiFiManager::startConfigPortal(char const *apName, char const *apPassword) {
_begin();
if(configPortalActive){
#ifdef WM_DEBUG_LEVEL
DEBUG_WM(DEBUG_VERBOSE,F("Starting Config Portal FAILED, is already running"));
#endif
return false;
}
//setup AP
_apName = apName; // @todo check valid apname ?
_apPassword = apPassword;