From 29966c53ffe8062e7da51011db36d38274929b93 Mon Sep 17 00:00:00 2001 From: yaapu Date: Sat, 12 Jun 2021 22:05:07 +0000 Subject: [PATCH] colorlcd: fix for BOLD font h/v offsets, fix for lcd.clear() --- radio/src/lua/api_colorlcd.cpp | 2 +- radio/src/lua/api_colorlcd.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/radio/src/lua/api_colorlcd.cpp b/radio/src/lua/api_colorlcd.cpp index a39df5517..a4483728e 100644 --- a/radio/src/lua/api_colorlcd.cpp +++ b/radio/src/lua/api_colorlcd.cpp @@ -82,7 +82,7 @@ Clear the LCD screen static int luaLcdClear(lua_State * L) { if (luaLcdAllowed && luaLcdBuffer) { - LcdFlags color = luaL_optunsigned(L, 1, DEFAULT_BGCOLOR); + LcdFlags color = luaL_optunsigned(L, 1, DEFAULT_BGCOLOR_INDEX << 16u); luaLcdBuffer->clear(COLOR(COLOR_VAL(color))); } return 0; diff --git a/radio/src/lua/api_colorlcd.h b/radio/src/lua/api_colorlcd.h index 13d480a66..cad42e242 100644 --- a/radio/src/lua/api_colorlcd.h +++ b/radio/src/lua/api_colorlcd.h @@ -33,8 +33,8 @@ constexpr coord_t INVERT_BOX_MARGIN = 2; -constexpr int8_t text_horizontal_offset[7] {-2,-2,-2,-2,-2,-2,-2}; -constexpr int8_t text_vertical_offset[7] {2,0,0,2,3,3,7}; +constexpr int8_t text_horizontal_offset[7] {-2,-1,-2,-2,-2,-2,-2}; +constexpr int8_t text_vertical_offset[7] {2,2,0,2,3,3,7}; extern bool luaLcdAllowed; extern BitmapBuffer * luaLcdBuffer;