From 61bde526cceb7a73d8c58f2db3b61633ff96efca Mon Sep 17 00:00:00 2001 From: olliw42 <6089567+olliw42@users.noreply.github.com> Date: Thu, 20 Feb 2020 09:25:09 +0100 Subject: [PATCH] Add color option to luaLcdDrawPoint() (#7386) Add color option to luaLcdDrawPoint() --- radio/src/lua/api_lcd.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/radio/src/lua/api_lcd.cpp b/radio/src/lua/api_lcd.cpp index 039aa5547..e42a5f1cc 100644 --- a/radio/src/lua/api_lcd.cpp +++ b/radio/src/lua/api_lcd.cpp @@ -71,6 +71,8 @@ Draw a single pixel at (x,y) position @param y (positive number) y position +@param flags (unsigned number) drawing flags + @notice Taranis has an LCD display width of 212 pixels and height of 64 pixels. Position (0,0) is at top left. Y axis is negative, top line is 0, bottom line is 63. Drawing on an existing black pixel produces white pixel (TODO check this!) @@ -82,7 +84,8 @@ static int luaLcdDrawPoint(lua_State *L) if (!luaLcdAllowed) return 0; int x = luaL_checkinteger(L, 1); int y = luaL_checkinteger(L, 2); - lcdDrawPoint(x, y); + LcdFlags att = luaL_optunsigned(L, 3, 0); + lcdDrawPoint(x, y, att); return 0; }