From 6975848f45a6c1a2f23d06ad2ca4871678a80005 Mon Sep 17 00:00:00 2001 From: Jm Casler Date: Sun, 13 Dec 2020 11:01:01 -0800 Subject: [PATCH] #563 Don't display the wifi password when we are a client. --- src/graphics/Screen.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/graphics/Screen.cpp b/src/graphics/Screen.cpp index c112a295..229aa63a 100644 --- a/src/graphics/Screen.cpp +++ b/src/graphics/Screen.cpp @@ -1100,10 +1100,14 @@ void DebugInfo::drawFrameWiFi(OLEDDisplay *display, OLEDDisplayUiState *state, i } } else { - if ((millis() / 10000) % 2) { - display->drawString(x, y + FONT_HEIGHT_SMALL * 2, "SSID: " + String(wifiName)); + if (radioConfig.preferences.wifi_ap_mode) { + if ((millis() / 10000) % 2) { + display->drawString(x, y + FONT_HEIGHT_SMALL * 2, "SSID: " + String(wifiName)); + } else { + display->drawString(x, y + FONT_HEIGHT_SMALL * 2, "PWD: " + String(wifiPsw)); + } } else { - display->drawString(x, y + FONT_HEIGHT_SMALL * 2, "PWD: " + String(wifiPsw)); + display->drawString(x, y + FONT_HEIGHT_SMALL * 2, "SSID: " + String(wifiName)); } } display->drawString(x, y + FONT_HEIGHT_SMALL * 3, "http://meshtastic.local");