mirror of
https://github.com/alexhopeoconnor/WiFiManager.git
synced 2026-10-13 23:01:20 +10:00
#528 adds getLastConxResult
This commit is contained in:
@@ -170,6 +170,7 @@ boolean WiFiManager::autoConnect(char const *apName, char const *apPassword) {
|
||||
if (WiFi.status() == WL_CONNECTED || connectWifi("", "") == WL_CONNECTED) {
|
||||
//connected
|
||||
DEBUG_WM(F("IP Address:"),WiFi.localIP());
|
||||
_lastconxresult = WL_CONNECTED;
|
||||
return true;
|
||||
}
|
||||
// not connected start configportal
|
||||
@@ -492,6 +493,7 @@ int WiFiManager::connectWifi(String ssid, String pass) {
|
||||
connRes = waitForConnectResult();
|
||||
}
|
||||
|
||||
_lastconxresult = connRes;
|
||||
return connRes;
|
||||
}
|
||||
|
||||
@@ -1429,6 +1431,10 @@ void WiFiManager::setScanDispPerc(boolean enabled){
|
||||
_scanDispOptions = true;
|
||||
}
|
||||
|
||||
uint8_t WiFiManager::getLastConxResult(){
|
||||
return _lastconxresult;
|
||||
}
|
||||
|
||||
// HELPERS
|
||||
|
||||
template <typename Generic>
|
||||
|
||||
Reference in New Issue
Block a user