mirror of
https://github.com/meshtastic/firmware.git
synced 2025-10-06 15:03:22 +00:00
Merge pull request #8136 from plashchynski/fix_no_gps_double_message
UIRenderer: display "No GPS present" only on the first line to avoid duplication
This commit is contained in:
commit
667b7c50e2
@ -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) {
|
||||||
|
if (strcmp(mode, "line1") == 0) {
|
||||||
strcpy(displayLine, "No GPS present");
|
strcpy(displayLine, "No GPS present");
|
||||||
display->drawString(x, y, displayLine);
|
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