1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-25 17:25:13 +03:00

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

View file

@ -723,9 +723,9 @@ void menuModelSetup(event_t event)
lcdDrawTextAlignedLeft(y, STR_CHANNELRANGE);
if ((int8_t)PORT_CHANNELS_ROWS(moduleIdx) >= 0) {
lcdDrawText(MODEL_SETUP_2ND_COLUMN, y, STR_CH, menuHorizontalPosition==0 ? attr : 0);
lcdDrawNumber(lcdLastPos, y, moduleData.channelsStart+1, LEFT | (menuHorizontalPosition==0 ? attr : 0));
lcdDrawChar(lcdLastPos, y, '-');
lcdDrawNumber(lcdLastPos + FW+1, y, moduleData.channelsStart+NUM_CHANNELS(moduleIdx), LEFT | (menuHorizontalPosition==1 ? attr : 0));
lcdDrawNumber(lcdLastRightPos, y, moduleData.channelsStart+1, LEFT | (menuHorizontalPosition==0 ? attr : 0));
lcdDrawChar(lcdLastRightPos, y, '-');
lcdDrawNumber(lcdLastRightPos + FW+1, y, moduleData.channelsStart+NUM_CHANNELS(moduleIdx), LEFT | (menuHorizontalPosition==1 ? attr : 0));
if (attr && (editMode>0 || p1valdiff)) {
switch (menuHorizontalPosition) {
case 0:
@ -953,9 +953,9 @@ void menuModelSetup(event_t event)
lcdDrawTextAlignedLeft(y, PSTR("Port2"));
lcdDrawTextAtIndex(MODEL_SETUP_2ND_COLUMN, y, STR_VPROTOS, 0, 0);
lcdDrawText(MODEL_SETUP_2ND_COLUMN+4*FW+3, y, STR_CH, menuHorizontalPosition<=0 ? attr : 0);
lcdDrawNumber(lcdLastPos, y, g_model.moduleData[1].channelsStart+1, LEFT | (menuHorizontalPosition<=0 ? attr : 0));
lcdDrawChar(lcdLastPos, y, '-');
lcdDrawNumber(lcdLastPos + FW+1, y, g_model.moduleData[1].channelsStart+8+g_model.moduleData[1].channelsCount, LEFT | (menuHorizontalPosition!=0 ? attr : 0));
lcdDrawNumber(lcdLastRightPos, y, g_model.moduleData[1].channelsStart+1, LEFT | (menuHorizontalPosition<=0 ? attr : 0));
lcdDrawChar(lcdLastRightPos, y, '-');
lcdDrawNumber(lcdLastRightPos + FW+1, y, g_model.moduleData[1].channelsStart+8+g_model.moduleData[1].channelsCount, LEFT | (menuHorizontalPosition!=0 ? attr : 0));
if (attr && (editMode>0 || p1valdiff)) {
switch (menuHorizontalPosition) {
case 0: