Fix lcd.drawGauge outer rectangle which was always black
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user