[Horus] GPS display fix
This commit is contained in:
@@ -360,8 +360,14 @@ void drawGPSCoord(coord_t x, coord_t y, int32_t value, const char * direction, L
|
||||
|
||||
void drawGPSPosition(coord_t x, coord_t y, int32_t longitude, int32_t latitude, LcdFlags flags)
|
||||
{
|
||||
drawGPSCoord(x, y, longitude, "EW", flags);
|
||||
drawGPSCoord(x, y+FH, latitude, "NS", flags);
|
||||
if (flags & EXPANDED) {
|
||||
drawGPSCoord(x, y, longitude, "EW", flags, true);
|
||||
drawGPSCoord(x, y + FH, latitude, "NS", flags, true);
|
||||
}
|
||||
else {
|
||||
drawGPSCoord(x, y, longitude, "EW", flags, false);
|
||||
drawGPSCoord(lcdNextPos+5, y, latitude, "NS", flags, false);
|
||||
}
|
||||
}
|
||||
|
||||
void drawGPSSensorValue(coord_t x, coord_t y, TelemetryItem & telemetryItem, LcdFlags flags)
|
||||
|
||||
@@ -88,6 +88,7 @@ enum FontSizeIndex {
|
||||
|
||||
#define TIMEBLINK 0x1000
|
||||
#define TIMEHOUR 0x2000
|
||||
#define EXPANDED 0x2000
|
||||
#define VERTICAL 0x4000
|
||||
#define NO_FONTCACHE 0x8000
|
||||
|
||||
|
||||
@@ -75,13 +75,20 @@ void ValueWidget::refresh()
|
||||
yValue = y+18;
|
||||
xLabel = x+NUMBERS_PADDING;
|
||||
yLabel = y+2;
|
||||
if (field >= MIXSRC_FIRST_TELEM) {
|
||||
if (isGPSSensor(1+(field-MIXSRC_FIRST_TELEM)/3)) {
|
||||
attrValue = LEFT | MIDSIZE | EXPANDED;
|
||||
}
|
||||
else {
|
||||
attrValue = LEFT | DBLSIZE;
|
||||
}
|
||||
}
|
||||
#if defined(INTERNAL_GPS)
|
||||
if (field == MIXSRC_TX_GPS) {
|
||||
attrValue = LEFT | MIDSIZE;
|
||||
else if (field == MIXSRC_TX_GPS) {
|
||||
attrValue = LEFT | MIDSIZE | EXPANDED;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
else {
|
||||
attrValue = LEFT | DBLSIZE;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user