1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-27 02:05:16 +03:00

[X9D] Display regressions fixed

This commit is contained in:
bsongis 2012-11-27 22:13:48 +00:00
parent 10fa05c3ce
commit 9f8045c362
3 changed files with 7 additions and 6 deletions

View file

@ -227,7 +227,7 @@ void lcd_putsnAtt(xcoord_t x, uint8_t y, const pm_char * s, uint8_t len, LcdFlag
if (!c || x>DISPLAY_W-6) break; if (!c || x>DISPLAY_W-6) break;
if (c >= 0x20) { if (c >= 0x20) {
lcd_putcAtt(x,y,c,mode); lcd_putcAtt(x,y,c,mode);
x += FW - (mode&CONDENSED ? 1 : 0); x += FW;
if (mode&DBLSIZE) x += FW-1; if (mode&DBLSIZE) x += FW-1;
else if (mode&MIDSIZE) x += FW-3; else if (mode&MIDSIZE) x += FW-3;
} }
@ -667,7 +667,7 @@ void putsSwitches(xcoord_t x, uint8_t y, int8_t idx, LcdFlags att)
} }
} }
#endif #endif
if (~att & CONDENSED) lcd_putcAtt(x+3*FW, y, suffix, att); if (~att & SWCONDENSED) lcd_putcAtt(x+3*FW, y, suffix, att);
} }
lcd_putsiAtt(x, y, STR_VSWITCHES, idx-1, att); lcd_putsiAtt(x, y, STR_VSWITCHES, idx-1, att);
} }

View file

@ -88,6 +88,7 @@
/* switches flags */ /* switches flags */
#define SWONOFF 0x10 /* means inlude ON OFF in switches */ #define SWONOFF 0x10 /* means inlude ON OFF in switches */
#define SWCONDENSED 0x20 /* means that THRm will be displayed as THR */
/* telemetry flags */ /* telemetry flags */
#define NO_UNIT 0x40 #define NO_UNIT 0x40

View file

@ -273,7 +273,7 @@ void menuMainView(uint8_t event)
if (g_model.timers[0].mode) { if (g_model.timers[0].mode) {
LcdFlags att = MIDSIZE | (s_timerState[0]==TMR_BEEPING ? BLINK|INVERS : 0); LcdFlags att = MIDSIZE | (s_timerState[0]==TMR_BEEPING ? BLINK|INVERS : 0);
putsTime(TIMERS_X, 0, s_timerVal[0], att, att); putsTime(TIMERS_X, 0, s_timerVal[0], att, att);
putsTmrMode(TIMERS_X-23, 4, g_model.timers[0].mode, CONDENSED); putsTmrMode(TIMERS_X-25, 4, g_model.timers[0].mode, SWCONDENSED);
if (g_model.timers[0].remanent) lcd_putc(TIMERS_X+42, 1, 'R'); if (g_model.timers[0].remanent) lcd_putc(TIMERS_X+42, 1, 'R');
} }
@ -281,7 +281,7 @@ void menuMainView(uint8_t event)
if (g_model.timers[1].mode) { if (g_model.timers[1].mode) {
LcdFlags att = MIDSIZE | (s_timerState[1]==TMR_BEEPING ? BLINK|INVERS : 0); LcdFlags att = MIDSIZE | (s_timerState[1]==TMR_BEEPING ? BLINK|INVERS : 0);
putsTime(TIMERS_X, (FH+3), s_timerVal[1], att, att); putsTime(TIMERS_X, (FH+3), s_timerVal[1], att, att);
putsTmrMode(TIMERS_X-23, FH+7, g_model.timers[1].mode, CONDENSED); putsTmrMode(TIMERS_X-25, FH+7, g_model.timers[1].mode, SWCONDENSED);
if (g_model.timers[1].remanent) lcd_putc(TIMERS_X+42, FH+4, 'R'); if (g_model.timers[1].remanent) lcd_putc(TIMERS_X+42, FH+4, 'R');
} }
#else #else
@ -289,7 +289,7 @@ void menuMainView(uint8_t event)
if (g_model.timers[0].mode) { if (g_model.timers[0].mode) {
uint8_t att = DBLSIZE | (s_timerState[0]==TMR_BEEPING ? BLINK|INVERS : 0); uint8_t att = DBLSIZE | (s_timerState[0]==TMR_BEEPING ? BLINK|INVERS : 0);
putsTime(12*FW+2, FH*2, s_timerVal[0], att, att); putsTime(12*FW+2, FH*2, s_timerVal[0], att, att);
putsTmrMode(s_timerVal[0] >= 0 ? 9*FW-FW/2+5 : 9*FW-FW/2-2, FH*3, g_model.timers[0].mode, CONDENSED); putsTmrMode(s_timerVal[0] >= 0 ? 9*FW-FW/2+3 : 9*FW-FW/2-4, FH*3, g_model.timers[0].mode, SWCONDENSED);
} }
#endif #endif
@ -460,7 +460,7 @@ void menuMainView(uint8_t event)
} }
else { // timer2 else { // timer2
putsTime(33+FW+2, FH*5, s_timerVal[1], DBLSIZE, DBLSIZE); putsTime(33+FW+2, FH*5, s_timerVal[1], DBLSIZE, DBLSIZE);
putsTmrMode(s_timerVal[1] >= 0 ? 20-FW/2+5 : 20-FW/2-2, FH*6, g_model.timers[1].mode, CONDENSED); putsTmrMode(s_timerVal[1] >= 0 ? 20-FW/2+5 : 20-FW/2-2, FH*6, g_model.timers[1].mode, SWCONDENSED);
// lcd_outdezNAtt(33+11*FW, FH*6, s_timerVal_10ms[1], LEADING0, 2); // 1/100s // lcd_outdezNAtt(33+11*FW, FH*6, s_timerVal_10ms[1], LEADING0, 2); // 1/100s
} }