From 714a9a3bea4188e22e8b8ae66af72d8a7d457f3c Mon Sep 17 00:00:00 2001 From: yaapu Date: Sat, 5 Jun 2021 14:41:28 +0000 Subject: [PATCH] color_lcd: fixed lcd.drawGauge() --- radio/src/lua/api_colorlcd.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/radio/src/lua/api_colorlcd.cpp b/radio/src/lua/api_colorlcd.cpp index 83eadf148..ed2146e13 100644 --- a/radio/src/lua/api_colorlcd.cpp +++ b/radio/src/lua/api_colorlcd.cpp @@ -665,6 +665,8 @@ static int luaLcdDrawGauge(lua_State *L) int den = luaL_checkinteger(L, 6); unsigned int flags = luaL_optunsigned(L, 7, 0); + flags = (flags & 0xFFFF) | COLOR(COLOR_VAL(flags)); + luaLcdBuffer->drawRect(x, y, w, h, 1, 0xff, flags); uint8_t len = limit((uint8_t)1, uint8_t(w*num/den), uint8_t(w)); luaLcdBuffer->drawSolidFilledRect(x+1, y+1, len, h-2, flags);