Fix lcdLastPos (#4487)

* Fix lcdLastPos
Introduce lcdLeftPos

* Cosmetics

* Cosmetics

* Non ARM code cleanup

* Move telem screen to midsize

* Fine tune

* Renaming
This commit is contained in:
3djc
2017-03-04 10:16:45 +01:00
committed by Bertrand Songis
parent 4a2bbc665c
commit 80b44444ec
36 changed files with 279 additions and 242 deletions
+3 -3
View File
@@ -519,7 +519,7 @@ void menuModelTelemetryFrsky(event_t event)
if (k>=ITEM_TELEMETRY_SENSOR1 && k<ITEM_TELEMETRY_SENSOR1+MAX_TELEMETRY_SENSORS) {
int index = k - ITEM_TELEMETRY_SENSOR1;
lcdDrawNumber(INDENT_WIDTH, y, index+1, LEFT|attr);
lcdDrawChar(lcdLastPos, y, ':', attr);
lcdDrawChar(lcdLastRightPos, y, ':', attr);
lcdDrawSizedText(3*FW, y, g_model.telemetrySensors[index].label, TELEM_LABEL_LEN, ZCHAR);
if (telemetryItems[index].isFresh()) {
lcdDrawChar(16*FW, y, '*');
@@ -530,7 +530,7 @@ void menuModelTelemetryFrsky(event_t event)
lcdNextPos = TELEM_COL2;
if (isOld) lcdDrawChar(lcdNextPos, y, '[');
drawSensorCustomValue(lcdNextPos, y, index, getValue(MIXSRC_FIRST_TELEM+3*index), LEFT);
if (isOld) lcdDrawChar(lcdLastPos, y, ']');
if (isOld) lcdDrawChar(lcdLastRightPos, y, ']');
}
else {
lcdDrawText(TELEM_COL2, y, "---", 0); // TODO shortcut
@@ -626,7 +626,7 @@ void menuModelTelemetryFrsky(event_t event)
case ITEM_TELEMETRY_A2_RANGE:
lcdDrawTextAlignedLeft(y, STR_RANGE);
drawTelemetryValue(TELEM_COL2, y, dest, 255-channel.offset, (menuHorizontalPosition<=0 ? attr : 0)|NO_UNIT|LEFT);
lcdDrawTextAtIndex(lcdLastPos, y, STR_VTELEMUNIT, channel.type, menuHorizontalPosition!=0 ? attr : 0);
lcdDrawTextAtIndex(lcdLastRightPos, y, STR_VTELEMUNIT, channel.type, menuHorizontalPosition!=0 ? attr : 0);
if (attr && (s_editMode>0 || p1valdiff)) {
if (menuHorizontalPosition == 0) {
uint16_t ratio = checkIncDec(event, channel.ratio, 0, 256, EE_MODEL);