mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-13 00:22:10 +00:00
don't show fake GPS level on devices without one #4
This commit is contained in:
parent
46dab2d496
commit
425c570757
@ -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
|
// We don't show battery levels yet - for now just lie and show debug info
|
||||||
static char batStr[20];
|
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[] = {
|
const char *fields[] = {
|
||||||
batStr,
|
batStr,
|
||||||
"GPS 75%",
|
gpsStr,
|
||||||
usersStr,
|
usersStr,
|
||||||
channelStr,
|
channelStr,
|
||||||
NULL};
|
NULL};
|
||||||
|
Loading…
Reference in New Issue
Block a user