fixed gvar display when precision is used. (#6779)
This commit is contained in:
committed by
Bertrand Songis
parent
a5536c4d93
commit
5f19fef136
@@ -157,14 +157,15 @@ bool menuModelGVars(event_t event)
|
||||
gvar_t v = fm->gvars[i];
|
||||
|
||||
LcdFlags attr = RIGHT | ((sub == i && menuHorizontalPosition == j) ? (s_editMode > 0 ? BLINK | INVERS : INVERS) : 0);
|
||||
if (j == curfm)
|
||||
attr |= BOLD;
|
||||
coord_t x = GVARS_FM_COLUMN(j);
|
||||
coord_t yval = y;
|
||||
if (v <= GVAR_MAX && (g_model.gvars[i].prec > 0 || abs(v) >= 1000 || ( abs(v) >= 100 && g_model.gvars[i].unit > 0))) {
|
||||
attr |= SMLSIZE;
|
||||
yval += 3;
|
||||
}
|
||||
else if (j == curfm) {
|
||||
attr |= BOLD;
|
||||
}
|
||||
if (v <= GVAR_MAX && g_model.gvars[i].unit > 0) {
|
||||
x -= 9;
|
||||
lcdDrawText(GVARS_FM_COLUMN(j) - 9, y+5, "%", TINSIZE);
|
||||
|
||||
Reference in New Issue
Block a user