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

Small display bug on SMLSIZE numbers with PREC1 (used in Failsafe menu

on Taranis)
This commit is contained in:
bsongis 2014-05-16 15:48:57 +02:00
parent fec39c4222
commit 40783acc36

View file

@ -458,13 +458,18 @@ void lcd_outdezNAtt(xcoord_t x, uint8_t y, lcdint_t val, LcdFlags flags, uint8_t
bool midsize = flags & MIDSIZE; bool midsize = flags & MIDSIZE;
bool tinsize = flags & TINSIZE; bool tinsize = flags & TINSIZE;
#else #else
#define midsize 0 #define midsize 0
#define tinsize 0 #define tinsize 0
#endif #endif
bool neg = false; bool neg = false;
if (flags & UNSIGN) { flags -= UNSIGN; } if (flags & UNSIGN) {
else if (val < 0) { neg=true; val=-val; } flags -= UNSIGN;
}
else if (val < 0) {
neg = true;
val = -val;
}
xcoord_t xn = 0; xcoord_t xn = 0;
uint8_t ln = 2; uint8_t ln = 2;
@ -480,8 +485,9 @@ void lcd_outdezNAtt(xcoord_t x, uint8_t y, lcdint_t val, LcdFlags flags, uint8_t
len++; len++;
tmp /= 10; tmp /= 10;
} }
if (len <= mode) if (len <= mode) {
len = mode + 1; len = mode + 1;
}
} }
@ -525,7 +531,7 @@ void lcd_outdezNAtt(xcoord_t x, uint8_t y, lcdint_t val, LcdFlags flags, uint8_t
} }
#endif #endif
lcd_putcAtt(x, y, c, f); lcd_putcAtt(x, y, c, f);
if (mode==i) { if (mode == i) {
flags &= ~PREC2; // TODO not needed but removes 20bytes, could be improved for sure, check asm flags &= ~PREC2; // TODO not needed but removes 20bytes, could be improved for sure, check asm
if (dblsize) { if (dblsize) {
xn = x - 2; xn = x - 2;
@ -550,7 +556,6 @@ void lcd_outdezNAtt(xcoord_t x, uint8_t y, lcdint_t val, LcdFlags flags, uint8_t
lcd_plot(x-1, y+4); lcd_plot(x-1, y+4);
if ((flags&INVERS) && ((~flags & BLINK) || BLINK_ON_PHASE)) { if ((flags&INVERS) && ((~flags & BLINK) || BLINK_ON_PHASE)) {
lcd_vline(x-1, y, 6); lcd_vline(x-1, y, 6);
lcd_vline(x, y, 6);
} }
x--; x--;
} }