mirror of
https://github.com/alexhopeoconnor/WiFiManager.git
synced 2026-10-17 16:41:31 +10:00
adds preloadWiFi default ssid pass
This commit is contained in:
+8
-1
@@ -316,7 +316,7 @@ boolean WiFiManager::autoConnect(char const *apName, char const *apPassword) {
|
||||
// and we have no idea WHAT we are connected to
|
||||
}
|
||||
|
||||
if(connected || connectWifi("", "") == WL_CONNECTED){
|
||||
if(connected || connectWifi(_defaultssid, _defaultpass) == WL_CONNECTED){
|
||||
//connected
|
||||
#ifdef WM_DEBUG_LEVEL
|
||||
DEBUG_WM(F("AutoConnect: SUCCESS"));
|
||||
@@ -2921,6 +2921,13 @@ void WiFiManager::setHttpPort(uint16_t port){
|
||||
_httpPort = port;
|
||||
}
|
||||
|
||||
|
||||
bool WiFiManager::preloadWiFi(String ssid, String pass){
|
||||
_defaultssid = ssid;
|
||||
_defaultpass = pass;
|
||||
return true;
|
||||
}
|
||||
|
||||
// HELPERS
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user