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

@ -463,8 +463,13 @@ void lcd_outdezNAtt(xcoord_t x, uint8_t y, lcdint_t val, LcdFlags flags, uint8_t
#endif
bool neg = false;
if (flags & UNSIGN) { flags -= UNSIGN; }
else if (val < 0) { neg=true; val=-val; }
if (flags & UNSIGN) {
flags -= UNSIGN;
}
else if (val < 0) {
neg = true;
val = -val;
}
xcoord_t xn = 0;
uint8_t ln = 2;
@ -480,9 +485,10 @@ void lcd_outdezNAtt(xcoord_t x, uint8_t y, lcdint_t val, LcdFlags flags, uint8_t
len++;
tmp /= 10;
}
if (len <= mode)
if (len <= mode) {
len = mode + 1;
}
}
if (dblsize) {
@ -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);
if ((flags&INVERS) && ((~flags & BLINK) || BLINK_ON_PHASE)) {
lcd_vline(x-1, y, 6);
lcd_vline(x, y, 6);
}
x--;
}