Merge pull request #195 from yaapu/pr/colorlcd_clear_bold

colorlcd: fix for BOLD font h/v offsets, fix for lcd.clear()
This commit is contained in:
Raphael Coeffic
2021-06-13 18:48:14 +02:00
committed by GitHub
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -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;
+2 -2
View File
@@ -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;