UIRenderer: display "No GPS present" only on the first line to avoid duplication

This commit is contained in:
Dzmitry Plashchynski 2025-09-27 15:56:52 +03:00
parent a2d86454d3
commit e8627b2d01

View File

@ -125,8 +125,10 @@ void UIRenderer::drawGpsCoordinates(OLEDDisplay *display, int16_t x, int16_t y,
char displayLine[32];
if (!gps->getIsConnected() && !config.position.fixed_position) {
strcpy(displayLine, "No GPS present");
display->drawString(x, y, displayLine);
if (strcmp(mode, "line1") == 0) {
strcpy(displayLine, "No GPS present");
display->drawString(x, y, displayLine);
}
} else if (!gps->getHasLock() && !config.position.fixed_position) {
if (strcmp(mode, "line1") == 0) {
strcpy(displayLine, "No GPS Lock");