mirror of
https://github.com/alexhopeoconnor/WiFiManager.git
synced 2026-10-04 02:48:13 +10:00
Changed ssid psk gets to peristent
Status would not show existing saved ssid psk or status if connect failed, as current config is empty if conx fails, this might break something not sure what else I am using non persistent checking for
This commit is contained in:
+5
-3
@@ -3399,10 +3399,12 @@ String WiFiManager::WiFi_psk(bool persistent) const {
|
||||
#ifdef ESP32
|
||||
void WiFiManager::WiFiEvent(WiFiEvent_t event,system_event_info_t info){
|
||||
if(!_hasBegun){
|
||||
#ifdef WM_DEBUG_LEVEL
|
||||
// DEBUG_WM(DEBUG_VERBOSE,"[ERROR] WiFiEvent, not ready");
|
||||
#ifdef WM_DEBUG_LEVEL
|
||||
// DEBUG_WM(DEBUG_VERBOSE,"[ERROR] WiFiEvent, not ready");
|
||||
#endif
|
||||
Serial.println(F("[ERROR] wm not ready"));
|
||||
// Serial.println(F("\n[EVENT] WiFiEvent logging (wm debug not available)"));
|
||||
// Serial.print(F("[EVENT] ID: "));
|
||||
// Serial.println(event);
|
||||
return;
|
||||
}
|
||||
#ifdef WM_DEBUG_LEVEL
|
||||
|
||||
+4
-4
@@ -332,10 +332,10 @@ class WiFiManager
|
||||
bool getWiFiIsSaved();
|
||||
|
||||
// helper to get saved password, if persistent get stored, else get current if connected
|
||||
String getWiFiPass(bool persistent = false);
|
||||
String getWiFiPass(bool persistent = true);
|
||||
|
||||
// helper to get saved ssid, if persistent get stored, else get current if connected
|
||||
String getWiFiSSID(bool persistent = false);
|
||||
String getWiFiSSID(bool persistent = true);
|
||||
|
||||
// debug output the softap config
|
||||
void debugSoftAPConfig();
|
||||
@@ -538,8 +538,8 @@ class WiFiManager
|
||||
uint8_t WiFi_softap_num_stations();
|
||||
bool WiFi_hasAutoConnect();
|
||||
void WiFi_autoReconnect();
|
||||
String WiFi_SSID(bool persistent = false) const;
|
||||
String WiFi_psk(bool persistent = false) const;
|
||||
String WiFi_SSID(bool persistent = true) const;
|
||||
String WiFi_psk(bool persistent = true) const;
|
||||
bool WiFi_scanNetworks();
|
||||
bool WiFi_scanNetworks(bool force,bool async);
|
||||
bool WiFi_scanNetworks(unsigned int cachetime,bool async);
|
||||
|
||||
@@ -383,4 +383,36 @@ const wifi_country_t WM_COUNTRY_CN{"CN",1,13,WIFI_COUNTRY_POLICY_AUTO};
|
||||
const wifi_country_t WM_COUNTRY_JP{"JP",1,14,WIFI_COUNTRY_POLICY_AUTO};
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* ESP32 WiFi Events
|
||||
|
||||
0 SYSTEM_EVENT_WIFI_READY < ESP32 WiFi ready
|
||||
1 SYSTEM_EVENT_SCAN_DONE < ESP32 finish scanning AP
|
||||
2 SYSTEM_EVENT_STA_START < ESP32 station start
|
||||
3 SYSTEM_EVENT_STA_STOP < ESP32 station stop
|
||||
4 SYSTEM_EVENT_STA_CONNECTED < ESP32 station connected to AP
|
||||
5 SYSTEM_EVENT_STA_DISCONNECTED < ESP32 station disconnected from AP
|
||||
6 SYSTEM_EVENT_STA_AUTHMODE_CHANGE < the auth mode of AP connected by ESP32 station changed
|
||||
7 SYSTEM_EVENT_STA_GOT_IP < ESP32 station got IP from connected AP
|
||||
8 SYSTEM_EVENT_STA_LOST_IP < ESP32 station lost IP and the IP is reset to 0
|
||||
9 SYSTEM_EVENT_STA_WPS_ER_SUCCESS < ESP32 station wps succeeds in enrollee mode
|
||||
10 SYSTEM_EVENT_STA_WPS_ER_FAILED < ESP32 station wps fails in enrollee mode
|
||||
11 SYSTEM_EVENT_STA_WPS_ER_TIMEOUT < ESP32 station wps timeout in enrollee mode
|
||||
12 SYSTEM_EVENT_STA_WPS_ER_PIN < ESP32 station wps pin code in enrollee mode
|
||||
13 SYSTEM_EVENT_AP_START < ESP32 soft-AP start
|
||||
14 SYSTEM_EVENT_AP_STOP < ESP32 soft-AP stop
|
||||
15 SYSTEM_EVENT_AP_STACONNECTED < a station connected to ESP32 soft-AP
|
||||
16 SYSTEM_EVENT_AP_STADISCONNECTED < a station disconnected from ESP32 soft-AP
|
||||
17 SYSTEM_EVENT_AP_STAIPASSIGNED < ESP32 soft-AP assign an IP to a connected station
|
||||
18 SYSTEM_EVENT_AP_PROBEREQRECVED < Receive probe request packet in soft-AP interface
|
||||
19 SYSTEM_EVENT_GOT_IP6 < ESP32 station or ap or ethernet interface v6IP addr is preferred
|
||||
20 SYSTEM_EVENT_ETH_START < ESP32 ethernet start
|
||||
21 SYSTEM_EVENT_ETH_STOP < ESP32 ethernet stop
|
||||
22 SYSTEM_EVENT_ETH_CONNECTED < ESP32 ethernet phy link up
|
||||
23 SYSTEM_EVENT_ETH_DISCONNECTED < ESP32 ethernet phy link down
|
||||
24 SYSTEM_EVENT_ETH_GOT_IP < ESP32 ethernet got IP from connected AP
|
||||
25 SYSTEM_EVENT_MAX
|
||||
*/
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user