diff --git a/radio/src/lua/api_lcd.cpp b/radio/src/lua/api_lcd.cpp index 725aba31e..2c2f0a83c 100644 --- a/radio/src/lua/api_lcd.cpp +++ b/radio/src/lua/api_lcd.cpp @@ -395,13 +395,15 @@ void registerBitmapClass(lua_State * L) } /*luadoc -@function lcd.drawBitmap(bitmap, x, y) +@function lcd.drawBitmap(bitmap, x, y [, scale]) Displays a bitmap at (x,y) @param bitmap (pointer) point to a bitmap previously opened with Bipmap.open() -@param x,y (positive numbers) starting coordinate +@param x,y (positive numbers) starting coordinates + +@param scale (positive numbers) scale in %, 50 divides size by two, 100 is unchanged, 200 doubles size @notice Only available on color screens @@ -413,9 +415,10 @@ static int luaLcdDrawBitmap(lua_State *L) const BitmapBuffer * bitmap = checkBitmap(L, 1); int x = luaL_checkinteger(L, 2); int y = luaL_checkinteger(L, 3); + unsigned scale = luaL_optunsigned(L, 4, 0); if (bitmap) { - lcd->drawBitmap(x, y, bitmap); + lcd->drawBitmap(x, y, bitmap, 0, 0, 0, 0, (float) scale/100); } return 0; @@ -426,7 +429,7 @@ static int luaLcdDrawBitmap(lua_State *L) Draw a bitmap at (x,y) -@param x,y (positive numbers) starting coordinate +@param x,y (positive numbers) starting coordinates @param name (string) full path to the bitmap on SD card (i.e. “/IMAGES/test.bmp”)