mirror of
https://github.com/alexhopeoconnor/WiFiManager.git
synced 2026-10-04 02:48:13 +10:00
Disables usermode restore
I may add optionals later for this, right now sta mode is the default, and sta mode will always be the only mode on after using WM, if you were using ap mode you have to turn it back on yourself until I have a better solution or documentation.
This commit is contained in:
+2
-2
@@ -216,7 +216,7 @@ WiFiManager::~WiFiManager() {
|
||||
void WiFiManager::_begin(){
|
||||
if(_hasBegun) return;
|
||||
_hasBegun = true;
|
||||
_usermode = WiFi.getMode();
|
||||
// _usermode = WiFi.getMode();
|
||||
|
||||
#ifndef ESP32
|
||||
WiFi.persistent(false); // disable persistent so scannetworks and mode switching do not cause overwrites
|
||||
@@ -262,7 +262,7 @@ boolean WiFiManager::autoConnect(char const *apName, char const *apPassword) {
|
||||
if(esp32persistent) WiFi.persistent(false); // disable persistent for esp32 after esp_wifi_start or else saves wont work
|
||||
#endif
|
||||
|
||||
_usermode = WIFI_STA;
|
||||
_usermode = WIFI_STA; // When using autoconnect , assume the user wants sta mode on permanently.
|
||||
|
||||
// no getter for autoreconnectpolicy before this
|
||||
// https://github.com/esp8266/Arduino/pull/4359
|
||||
|
||||
+1
-1
@@ -335,7 +335,7 @@ class WiFiManager
|
||||
unsigned long _saveTimeout = 0; // ms stop trying to connect to ap on saves, in case bugs in esp waitforconnectresult
|
||||
unsigned long _configPortalStart = 0; // ms config portal start time (updated for timeouts)
|
||||
unsigned long _webPortalAccessed = 0; // ms last web access time
|
||||
WiFiMode_t _usermode = WIFI_OFF;
|
||||
WiFiMode_t _usermode = WIFI_STA; // Default user mode
|
||||
String _wifissidprefix = FPSTR(S_ssidpre); // auto apname prefix prefix+chipid
|
||||
uint8_t _lastconxresult = WL_IDLE_STATUS;
|
||||
int _numNetworks = 0;
|
||||
|
||||
Reference in New Issue
Block a user