Skip to content

Commit 667b7c5

Browse files
authored
Merge pull request #8136 from plashchynski/fix_no_gps_double_message
UIRenderer: display "No GPS present" only on the first line to avoid duplication
2 parents 806bf6c + 64c268f commit 667b7c5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/graphics/draw/UIRenderer.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,10 @@ void UIRenderer::drawGpsCoordinates(OLEDDisplay *display, int16_t x, int16_t y,
125125
char displayLine[32];
126126

127127
if (!gps->getIsConnected() && !config.position.fixed_position) {
128-
strcpy(displayLine, "No GPS present");
129-
display->drawString(x, y, displayLine);
128+
if (strcmp(mode, "line1") == 0) {
129+
strcpy(displayLine, "No GPS present");
130+
display->drawString(x, y, displayLine);
131+
}
130132
} else if (!gps->getHasLock() && !config.position.fixed_position) {
131133
if (strcmp(mode, "line1") == 0) {
132134
strcpy(displayLine, "No GPS Lock");

0 commit comments

Comments
 (0)