mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-10-06 03:27:51 +00:00
Merge pull request #3382 from Blake-Latchford/wifi-disconnect-reason-logging
Extend WiFi disconnect logging to specify reason
This commit is contained in:
@@ -229,7 +229,8 @@ void setup() {
|
||||
|
||||
WiFi.onEvent([](WiFiEvent_t event, WiFiEventInfo_t info){
|
||||
if (event == ARDUINO_EVENT_WIFI_STA_DISCONNECTED) {
|
||||
WIFI_DEBUG_PRINTLN("WiFi disconnected. Flagging for reconnect...");
|
||||
WIFI_DEBUG_PRINTLN("WiFi disconnected (reason=%s). Flagging for reconnect...",
|
||||
WiFi.disconnectReasonName((wifi_err_reason_t)info.wifi_sta_disconnected.reason));
|
||||
wifi_needs_reconnect = true;
|
||||
} else if (event == ARDUINO_EVENT_WIFI_STA_GOT_IP) {
|
||||
WIFI_DEBUG_PRINTLN("WiFi connected successfully!");
|
||||
|
||||
Reference in New Issue
Block a user