Fixed cluttered GPS display if right-aligned.
This commit is contained in:
@@ -317,17 +317,16 @@ coord_t drawGPSCoord(BitmapBuffer * dc, coord_t x, coord_t y, int32_t value, con
|
||||
}
|
||||
*tmp++ = direction[value>=0 ? 0 : 1];
|
||||
*tmp = '\0';
|
||||
x += dc->drawText(x, y, s, flags);
|
||||
x = dc->drawText(x, y, s, flags);
|
||||
return x;
|
||||
}
|
||||
|
||||
void drawGPSPosition(BitmapBuffer * dc, coord_t x, coord_t y, int32_t longitude, int32_t latitude, LcdFlags flags)
|
||||
{
|
||||
if (flags & EXPANDED) {
|
||||
drawGPSCoord(dc, x, y, latitude, "NS", flags, true);
|
||||
drawGPSCoord(dc, x, y + FH, longitude, "EW", flags, true);
|
||||
}
|
||||
else {
|
||||
if (flags & RIGHT) {
|
||||
x = drawGPSCoord(dc, x, y, longitude, "EW", flags, false);
|
||||
drawGPSCoord(dc, x - 5, y, latitude, "NS", flags, false);
|
||||
} else {
|
||||
x = drawGPSCoord(dc, x, y, latitude, "NS", flags, false);
|
||||
drawGPSCoord(dc, x + 5, y, longitude, "EW", flags, false);
|
||||
}
|
||||
|
||||
Vendored
+1
-1
Submodule radio/src/thirdparty/libopenui updated: d1c94e6279...bca0e093b0
Reference in New Issue
Block a user