mirror of
https://github.com/opentx/opentx.git
synced 2025-07-17 21:35:27 +03:00
Fix lcd.drawGauge outer rectangle which was always black
This commit is contained in:
parent
7161d90297
commit
7b3dcec30e
1 changed files with 5 additions and 1 deletions
|
@ -445,7 +445,11 @@ static int luaLcdDrawGauge(lua_State *L)
|
|||
int num = luaL_checkinteger(L, 5);
|
||||
int den = luaL_checkinteger(L, 6);
|
||||
unsigned int flags = luaL_optunsigned(L, 7, 0);
|
||||
lcdDrawRect(x, y, w, h);
|
||||
#if defined(PCBHORUS)
|
||||
lcdDrawRect(x, y, w, h, 1, 0xff, flags);
|
||||
#else
|
||||
lcdDrawRect(x, y, w, h, 0xff, flags);
|
||||
#endif
|
||||
uint8_t len = limit((uint8_t)1, uint8_t(w*num/den), uint8_t(w));
|
||||
lcdDrawSolidFilledRect(x+1, y+1, len, h-2, flags);
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue