From 0ec122f51902c3eefbb5f9e5973f969bafca21ba Mon Sep 17 00:00:00 2001 From: 3djc Date: Thu, 12 May 2016 22:08:30 +0200 Subject: [PATCH] Fix lcd.drawRectangle on Horus (#3485) * Fix lcd.drawRectangle on Horus * Fix lcd.drawRectangle on Horus, this time not breaking other platforms * Fix lcd.drawRectangle on Horus, this time *realy ?* not breaking other platforms * Fix lcd.drawRectangle on Horus, default thickness to 1 * Fix lcd.drawRectangle on Horus, move to unsigned, following projectkk2glider comment * Fix lcd.drawRectangle on Horus, spelling * Fix lcd.drawRectangle on Horus, indent (hope I did understand your comment correctly --- radio/src/lua/api_lcd.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/radio/src/lua/api_lcd.cpp b/radio/src/lua/api_lcd.cpp index 62a07c169..58148fb64 100644 --- a/radio/src/lua/api_lcd.cpp +++ b/radio/src/lua/api_lcd.cpp @@ -367,6 +367,8 @@ Draw a rectangle from top left corner (x,y) of specified width and height @param flags (unsigned number) drawing flags +@param t (number) thickness in pixels + @status current Introduced in 2.0.0 */ static int luaLcdDrawRectangle(lua_State *L) @@ -377,7 +379,12 @@ static int luaLcdDrawRectangle(lua_State *L) int w = luaL_checkinteger(L, 3); int h = luaL_checkinteger(L, 4); unsigned int flags = luaL_optunsigned(L, 5, 0); +#if defined(PCBHORUS) + int t = luaL_optunsigned(L, 6, 1); + lcdDrawRect(x, y, w, h, t, 0xff, flags); +#else lcdDrawRect(x, y, w, h, 0xff, flags); +#endif return 0; }