From 7d4c6c7086f241ec24a290df2c5c5e4745c03092 Mon Sep 17 00:00:00 2001 From: Jm Casler Date: Sat, 5 Sep 2020 14:41:00 -0700 Subject: [PATCH] Update Screen.cpp - Changed "No Satellite Lock" to "No GPS Lock" - Fixed bug when there's no battery. Now shows "USB" - Tested on tlora-v1 --- src/graphics/Screen.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/graphics/Screen.cpp b/src/graphics/Screen.cpp index 6f1bc6c91..f62e6854d 100644 --- a/src/graphics/Screen.cpp +++ b/src/graphics/Screen.cpp @@ -247,7 +247,7 @@ static void drawGPScoordinates(OLEDDisplay *display, int16_t x, int16_t y, const displayLine = "No GPS Module"; display->drawString(x + (SCREEN_WIDTH - (display->getStringWidth(displayLine))) / 2, y, displayLine); } else if (!gps->getHasLock()) { - displayLine = "No Satellite Lock"; + displayLine = "No GPS Lock"; display->drawString(x + (SCREEN_WIDTH - (display->getStringWidth(displayLine))) / 2, y, displayLine); } else { char coordinateLine[20]; @@ -848,14 +848,16 @@ void DebugInfo::drawFrameSettings(OLEDDisplay *display, OLEDDisplayUiState *stat powerStatus->getBatteryChargePercent(), powerStatus->getIsCharging() ? '+' : ' ', powerStatus->getHasUSB() ? 'U' : ' '); + + // Line 1 + display->drawString(x, y, batStr); } else { - snprintf(batStr, sizeof(batStr), "%s", powerStatus->getHasUSB() ? "USB" : ""); + // Line 1 + display->drawString(x, y, String("USB")); } - // Line 1 - display->drawString(x, y, batStr); //TODO: Display status of the BT radio //display->drawString(x + SCREEN_WIDTH - display->getStringWidth("BT-Off"), y, "BT-Off");