1
0
Fork 0
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:
3djc 2016-05-14 02:12:04 -07:00
parent 7161d90297
commit 7b3dcec30e

View file

@ -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;