mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-24 22:02:30 +00:00
Update Screen.cpp
- Changed "No Satellite Lock" to "No GPS Lock" - Fixed bug when there's no battery. Now shows "USB" - Tested on tlora-v1
This commit is contained in:
parent
f41a77c46d
commit
7d4c6c7086
@ -247,7 +247,7 @@ static void drawGPScoordinates(OLEDDisplay *display, int16_t x, int16_t y, const
|
|||||||
displayLine = "No GPS Module";
|
displayLine = "No GPS Module";
|
||||||
display->drawString(x + (SCREEN_WIDTH - (display->getStringWidth(displayLine))) / 2, y, displayLine);
|
display->drawString(x + (SCREEN_WIDTH - (display->getStringWidth(displayLine))) / 2, y, displayLine);
|
||||||
} else if (!gps->getHasLock()) {
|
} else if (!gps->getHasLock()) {
|
||||||
displayLine = "No Satellite Lock";
|
displayLine = "No GPS Lock";
|
||||||
display->drawString(x + (SCREEN_WIDTH - (display->getStringWidth(displayLine))) / 2, y, displayLine);
|
display->drawString(x + (SCREEN_WIDTH - (display->getStringWidth(displayLine))) / 2, y, displayLine);
|
||||||
} else {
|
} else {
|
||||||
char coordinateLine[20];
|
char coordinateLine[20];
|
||||||
@ -848,14 +848,16 @@ void DebugInfo::drawFrameSettings(OLEDDisplay *display, OLEDDisplayUiState *stat
|
|||||||
powerStatus->getBatteryChargePercent(),
|
powerStatus->getBatteryChargePercent(),
|
||||||
powerStatus->getIsCharging() ? '+' : ' ',
|
powerStatus->getIsCharging() ? '+' : ' ',
|
||||||
powerStatus->getHasUSB() ? 'U' : ' ');
|
powerStatus->getHasUSB() ? 'U' : ' ');
|
||||||
|
|
||||||
|
// Line 1
|
||||||
|
display->drawString(x, y, batStr);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
snprintf(batStr, sizeof(batStr), "%s", powerStatus->getHasUSB() ? "USB" : "");
|
// Line 1
|
||||||
|
display->drawString(x, y, String("USB"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Line 1
|
|
||||||
display->drawString(x, y, batStr);
|
|
||||||
|
|
||||||
//TODO: Display status of the BT radio
|
//TODO: Display status of the BT radio
|
||||||
//display->drawString(x + SCREEN_WIDTH - display->getStringWidth("BT-Off"), y, "BT-Off");
|
//display->drawString(x + SCREEN_WIDTH - display->getStringWidth("BT-Off"), y, "BT-Off");
|
||||||
|
Loading…
Reference in New Issue
Block a user