3djc/gps display fixes (#4852)

* Remove top GPS coord display on X7 sensor edit (not enough space for it)

* Improve GPS coord display on X9
This commit is contained in:
3djc
2017-04-25 12:06:40 +02:00
committed by Bertrand Songis
parent c15a86dc19
commit be20e90630
3 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -231,7 +231,7 @@ void menuModelSensor(event_t event)
SUBMENU(STR_MENUSENSOR, SENSOR_FIELD_MAX, {0, 0, sensor->type == TELEM_TYPE_CALCULATED ? (uint8_t)0 : (uint8_t)1, SENSOR_UNIT_ROWS, SENSOR_PREC_ROWS, SENSOR_PARAM1_ROWS, SENSOR_PARAM2_ROWS, SENSOR_PARAM3_ROWS, SENSOR_PARAM4_ROWS, SENSOR_AUTOOFFSET_ROWS, SENSOR_FILTER_ROWS, SENSOR_PERSISTENT_ROWS, 0 });
lcdDrawNumber(PSIZE(TR_MENUSENSOR)*FW+1, 0, s_currIdx+1, INVERS|LEFT);
drawSensorCustomValue(SENSOR_2ND_COLUMN, 0, s_currIdx, getValue(MIXSRC_FIRST_TELEM+3*s_currIdx), LEFT);
if (!isGPSSensor(s_currIdx+1)) drawSensorCustomValue(SENSOR_2ND_COLUMN, 0, s_currIdx, getValue(MIXSRC_FIRST_TELEM+3*s_currIdx), LEFT);
int8_t sub = menuVerticalPosition;
+1 -1
View File
@@ -797,7 +797,7 @@ void drawGPSSensorValue(coord_t x, coord_t y, TelemetryItem & telemetryItem, Lcd
}
else {
drawGPSCoord(x, y, telemetryItem.gps.latitude, "NS", att, false);
drawGPSCoord(lcdNextPos+FWNUM, y, telemetryItem.gps.longitude, "EW", att, false);
drawGPSCoord(lcdLastRightPos+2*FWNUM, y, telemetryItem.gps.longitude, "EW", att, false);
}
}
+2 -1
View File
@@ -127,7 +127,8 @@ bool displayNumbersTelemetryScreen(FrSkyScreenData & screen)
}
}
else if (field >= MIXSRC_FIRST_TELEM && isGPSSensor(1+(field-MIXSRC_FIRST_TELEM)/3) && telemetryItems[(field-MIXSRC_FIRST_TELEM)/3].isAvailable()) {
// we don't display GPS name, no space for it
// we don't display GPS name, no space for it, but we shift x by some pixel to allow it to fit on max coord
x -=2;
}
else {
drawSource(pos[j], 1+FH+2*FH*i, field, 0);