mirror of
https://github.com/meshtastic/firmware.git
synced 2025-10-03 05:53:24 +00:00
UIRenderer: display "No GPS present" only on the first line to avoid duplication
This commit is contained in:
parent
a2d86454d3
commit
e8627b2d01
@ -125,8 +125,10 @@ void UIRenderer::drawGpsCoordinates(OLEDDisplay *display, int16_t x, int16_t y,
|
|||||||
char displayLine[32];
|
char displayLine[32];
|
||||||
|
|
||||||
if (!gps->getIsConnected() && !config.position.fixed_position) {
|
if (!gps->getIsConnected() && !config.position.fixed_position) {
|
||||||
strcpy(displayLine, "No GPS present");
|
if (strcmp(mode, "line1") == 0) {
|
||||||
display->drawString(x, y, displayLine);
|
strcpy(displayLine, "No GPS present");
|
||||||
|
display->drawString(x, y, displayLine);
|
||||||
|
}
|
||||||
} else if (!gps->getHasLock() && !config.position.fixed_position) {
|
} else if (!gps->getHasLock() && !config.position.fixed_position) {
|
||||||
if (strcmp(mode, "line1") == 0) {
|
if (strcmp(mode, "line1") == 0) {
|
||||||
strcpy(displayLine, "No GPS Lock");
|
strcpy(displayLine, "No GPS Lock");
|
||||||
|
Loading…
Reference in New Issue
Block a user