Bsongis/issue 5311 (#5354)

Fixes #5311
This commit is contained in:
Bertrand Songis
2017-11-13 22:17:13 +01:00
committed by GitHub
parent e6542a78d0
commit e5b2b8ef64
12 changed files with 166 additions and 68 deletions
+4 -2
View File
@@ -114,7 +114,7 @@ void menuModelGVarOne(event_t event)
}
}
void onGVARSMenu(const char *result)
void onGVARSMenu(const char * result)
{
int sub = menuVerticalPosition;
@@ -165,16 +165,18 @@ void menuModelGVars(event_t event)
LcdFlags attr = ((sub == i && menuHorizontalPosition == j) ? (s_editMode > 0 ? BLINK | INVERS : INVERS) : 0);
coord_t x = GVARS_FM_COLUMN(j);
coord_t yval = y;
if (v > GVAR_MAX) {
attr |= SMLSIZE;
}
else if (g_model.gvars[i].prec > 0 || abs(v) >= 100) {
attr |= TINSIZE | NO_UNIT;
++yval;
}
else {
attr |= SMLSIZE | NO_UNIT;
}
editGVarValue(x, y, event, i, j, attr);
editGVarValue(x, yval, event, i, j, attr);
}
}