Skip to content

Commit 6a92358

Browse files
committed
Fix
1 parent e20a91b commit 6a92358

File tree

1 file changed

+0
-40
lines changed

1 file changed

+0
-40
lines changed

src/graphics/draw/UIRenderer.cpp

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1056,45 +1056,6 @@ void UIRenderer::drawCompassAndLocationScreen(OLEDDisplay *display, OLEDDisplayU
10561056
display->drawString(x, getTextPositions(display)[line++] + 2, latStr);
10571057
#else
10581058
snprintf(latStr, sizeof(latStr), " Lat: %.5f", geoCoord.getLatitude() * 1e-7);
1059-
// === Second Row: Last GPS Fix ===
1060-
if (gpsStatus->getLastFixMillis() > 0) {
1061-
uint32_t delta = (millis() - gpsStatus->getLastFixMillis()) / 1000; // seconds since last fix
1062-
uint32_t days = delta / 86400;
1063-
uint32_t hours = (delta % 86400) / 3600;
1064-
uint32_t mins = (delta % 3600) / 60;
1065-
uint32_t secs = delta % 60;
1066-
1067-
char buf[32];
1068-
#if defined(USE_EINK)
1069-
// E-Ink: skip seconds, show only days/hours/mins
1070-
if (days > 0) {
1071-
snprintf(buf, sizeof(buf), " Last: %ud %uh", days, hours);
1072-
} else if (hours > 0) {
1073-
snprintf(buf, sizeof(buf), " Last: %uh %um", hours, mins);
1074-
} else {
1075-
snprintf(buf, sizeof(buf), " Last: %um", mins);
1076-
}
1077-
#else
1078-
// Non E-Ink: include seconds where useful
1079-
if (days > 0) {
1080-
snprintf(buf, sizeof(buf), "Last: %ud %uh", days, hours);
1081-
} else if (hours > 0) {
1082-
snprintf(buf, sizeof(buf), "Last: %uh %um", hours, mins);
1083-
} else if (mins > 0) {
1084-
snprintf(buf, sizeof(buf), "Last: %um %us", mins, secs);
1085-
} else {
1086-
snprintf(buf, sizeof(buf), "Last: %us", secs);
1087-
}
1088-
#endif
1089-
1090-
display->drawString(0, getTextPositions(display)[line++], buf);
1091-
} else {
1092-
display->drawString(0, getTextPositions(display)[line++], "Last: ?");
1093-
}
1094-
1095-
// === Third Row: Latitude ===
1096-
char latStr[32];
1097-
snprintf(latStr, sizeof(latStr), "Lat: %.5f", geoCoord.getLatitude() * 1e-7);
10981059
display->drawString(x, getTextPositions(display)[line++], latStr);
10991060
#endif
11001061

@@ -1105,7 +1066,6 @@ void UIRenderer::drawCompassAndLocationScreen(OLEDDisplay *display, OLEDDisplayU
11051066
display->drawString(x, getTextPositions(display)[line++] + 4, lonStr);
11061067
#else
11071068
snprintf(lonStr, sizeof(lonStr), " Lon: %.5f", geoCoord.getLongitude() * 1e-7);
1108-
snprintf(lonStr, sizeof(lonStr), "Lon: %.5f", geoCoord.getLongitude() * 1e-7);
11091069
display->drawString(x, getTextPositions(display)[line++], lonStr);
11101070

11111071
// === Fifth Row: Altitude ===

0 commit comments

Comments
 (0)