From 8ad390d59b83517dcab9f342687e5d1c29f04ce1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20B=C3=A1ny=C3=A1sz?= <36520141+banyaszg@users.noreply.github.com> Date: Tue, 27 Sep 2022 04:03:53 +0200 Subject: [PATCH] fix(lua): lcd.drawGauge wide gauge error (#2375) --- radio/src/lua/api_colorlcd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/radio/src/lua/api_colorlcd.cpp b/radio/src/lua/api_colorlcd.cpp index 3bd0faf5a..95bc6debf 100644 --- a/radio/src/lua/api_colorlcd.cpp +++ b/radio/src/lua/api_colorlcd.cpp @@ -954,7 +954,7 @@ static int luaLcdDrawGauge(lua_State *L) flags = flagsRGB(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)); + uint16_t len = limit((uint16_t)1, uint16_t(w*num/den), uint16_t(w)); luaLcdBuffer->drawSolidFilledRect(x+1, y+1, len, h-2, flags); return 0;