don't show fake GPS level on devices without one #4

pull/18/head
geeksville 2020-03-04 10:51:29 -08:00
rodzic 46dab2d496
commit 425c570757
1 zmienionych plików z 8 dodań i 2 usunięć

Wyświetl plik

@ -445,11 +445,17 @@ void drawDebugInfo(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, i
// We don't show battery levels yet - for now just lie and show debug info
static char batStr[20];
snprintf(batStr, sizeof(channelStr), "Batt %x%%", (isCharging << 1) + isUSBPowered);
snprintf(batStr, sizeof(batStr), "Batt %x%%", (isCharging << 1) + isUSBPowered);
static char gpsStr[20];
if(myNodeInfo.has_gps)
snprintf(gpsStr, sizeof(gpsStr), "GPS %d%%", 75); // FIXME, use something based on hdop
else
gpsStr[0] = '\0'; // Just show emptystring
const char *fields[] = {
batStr,
"GPS 75%",
gpsStr,
usersStr,
channelStr,
NULL};