1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-19 22:35:12 +03:00

add lcd.backlightOn() (#7426)

add lcd.backlightOn()
This commit is contained in:
olliw42 2020-03-27 10:37:54 +01:00 committed by GitHub
parent a5f760e823
commit f59e939463
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -62,6 +62,20 @@ static int luaLcdClear(lua_State *L)
return 0; return 0;
} }
/*luadoc
@function lcd.backlightOn()
Switches backlight on
@status current Introduced in 2.3.6
*/
static int luaLcdBacklightOn(lua_State *L)
{
if (!luaLcdAllowed) return 0;
backlightOn();
return 0;
}
/*luadoc /*luadoc
@function lcd.drawPoint(x, y) @function lcd.drawPoint(x, y)
@ -861,6 +875,7 @@ static int luaRGB(lua_State *L)
const luaL_Reg lcdLib[] = { const luaL_Reg lcdLib[] = {
{ "refresh", luaLcdRefresh }, { "refresh", luaLcdRefresh },
{ "clear", luaLcdClear }, { "clear", luaLcdClear },
{ "backlightOn", luaLcdBacklightOn },
{ "drawPoint", luaLcdDrawPoint }, { "drawPoint", luaLcdDrawPoint },
{ "drawLine", luaLcdDrawLine }, { "drawLine", luaLcdDrawLine },
{ "drawRectangle", luaLcdDrawRectangle }, { "drawRectangle", luaLcdDrawRectangle },