From 9b4079317baa4542fb63f321bdd1de8cf4917b60 Mon Sep 17 00:00:00 2001 From: Jm Casler Date: Sat, 26 Sep 2020 23:37:58 -0700 Subject: [PATCH] Give more details of why wifi is disconnected --- src/graphics/Screen.cpp | 4 ++-- src/meshwifi/meshwifi.cpp | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/graphics/Screen.cpp b/src/graphics/Screen.cpp index 572912ff1..5696feb5b 100644 --- a/src/graphics/Screen.cpp +++ b/src/graphics/Screen.cpp @@ -905,8 +905,8 @@ void DebugInfo::drawFrameWiFi(OLEDDisplay *display, OLEDDisplayUiState *state, i display->drawString(x, y + FONT_HEIGHT * 1, "Connection Lost"); } else if (WiFi.status() == WL_CONNECT_FAILED) { display->drawString(x, y + FONT_HEIGHT * 1, "Connection Failed"); - } else if (WiFi.status() == WL_DISCONNECTED) { - display->drawString(x, y + FONT_HEIGHT * 1, "Disconnected"); + //} else if (WiFi.status() == WL_DISCONNECTED) { + // display->drawString(x, y + FONT_HEIGHT * 1, "Disconnected"); } else if (WiFi.status() == WL_IDLE_STATUS) { display->drawString(x, y + FONT_HEIGHT * 1, "Idle ... Reconnecting"); } else { diff --git a/src/meshwifi/meshwifi.cpp b/src/meshwifi/meshwifi.cpp index 0c775b5c8..4c5967530 100644 --- a/src/meshwifi/meshwifi.cpp +++ b/src/meshwifi/meshwifi.cpp @@ -57,6 +57,9 @@ void initWifi() return; } + //strcpy(radioConfig.preferences.wifi_ssid, ""); + //strcpy(radioConfig.preferences.wifi_password, ""); + if (radioConfig.has_preferences) { const char *wifiName = radioConfig.preferences.wifi_ssid; const char *wifiPsw = radioConfig.preferences.wifi_password;