3djc/x7 draw timer (#4764)

* Use drawText with tiem string like x12s. Change font ':' which where way to large for SMLSIZE

* MIDSIZE ':' lower dot was not horizontaly symetrical, moving it up one pixel

* Make it all ARM

* Let's try not to brake timer adjust

* Fix
This commit is contained in:
3djc
2017-04-08 16:59:21 +02:00
committed by Bertrand Songis
parent d04cb84c5b
commit d4c3ff743b
4 changed files with 7 additions and 6 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 755 B

After

Width:  |  Height:  |  Size: 762 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1003 B

After

Width:  |  Height:  |  Size: 1.3 KiB

+1 -1
View File
@@ -815,7 +815,7 @@ void drawTimer(coord_t x, coord_t y, putstime_t tme, LcdFlags att, LcdFlags att2
#endif
lcdDrawNumber(x, y, qr.quot, att|LEADING0|LEFT, 2);
#if defined(CPUARM)
if (att & MIDSIZE) {
if (FONTSIZE(att) == MIDSIZE) {
lcdLastRightPos--;
}
if (separator == CHR_HOUR)
+6 -5
View File
@@ -28,16 +28,16 @@ void drawCurveRef(coord_t x, coord_t y, CurveRef & curve, LcdFlags att)
lcdDrawText(x, y, "D", att);
GVAR_MENU_ITEM(lcdNextPos, y, curve.value, -100, 100, LEFT|att, 0, 0);
break;
case CURVE_REF_EXPO:
lcdDrawText(x, y, "E", att);
GVAR_MENU_ITEM(lcdNextPos, y, curve.value, -100, 100, LEFT|att, 0, 0);
break;
case CURVE_REF_FUNC:
lcdDrawTextAtIndex(x, y, STR_VCURVEFUNC, curve.value, att);
break;
case CURVE_REF_CUSTOM:
drawCurveName(x, y, curve.value, att);
break;
@@ -51,10 +51,10 @@ void drawSensorCustomValue(coord_t x, coord_t y, uint8_t sensor, int32_t value,
// Lua luaLcdDrawChannel() can call us with a bad value
return;
}
TelemetryItem & telemetryItem = telemetryItems[sensor];
TelemetrySensor & telemetrySensor = g_model.telemetrySensors[sensor];
if (telemetrySensor.unit == UNIT_DATETIME) {
drawDate(x, y, telemetryItem, flags);
}
@@ -126,6 +126,7 @@ void drawSourceCustomValue(coord_t x, coord_t y, source_t source, int32_t value,
drawSensorCustomValue(x, y, source, value, flags);
}
else if (source >= MIXSRC_FIRST_TIMER || source == MIXSRC_TX_TIME) {
if (value < 0) flags |= BLINK|INVERS;
drawTimer(x, y, value, flags);
}
else if (source == MIXSRC_TX_VOLTAGE) {