mirror of
https://github.com/opentx/opentx.git
synced 2025-07-15 04:15:26 +03:00
Fixes #3150
This commit is contained in:
parent
d7cbd78edf
commit
8942115f33
1 changed files with 2 additions and 9 deletions
|
@ -228,16 +228,9 @@ static int luaLcdDrawNumber(lua_State *L)
|
|||
if (!luaLcdAllowed) return 0;
|
||||
int x = luaL_checkinteger(L, 1);
|
||||
int y = luaL_checkinteger(L, 2);
|
||||
float val = luaL_checknumber(L, 3);
|
||||
int val = luaL_checkinteger(L, 3);
|
||||
unsigned int att = luaL_optunsigned(L, 4, 0);
|
||||
int n;
|
||||
if ((att & PREC2) == PREC2)
|
||||
n = val * 100;
|
||||
else if ((att & PREC1) == PREC1)
|
||||
n = val * 10;
|
||||
else
|
||||
n = val;
|
||||
lcdDrawNumber(x, y, n, att);
|
||||
lcdDrawNumber(x, y, val, att);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue