Fixes #1805
This commit is contained in:
+14
-1
@@ -337,6 +337,13 @@ static int luaKillEvents(lua_State *L)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int luaGrey(lua_State *L)
|
||||||
|
{
|
||||||
|
int index = luaL_checkinteger(L, 1);
|
||||||
|
lua_pushunsigned(L, GREY(index));
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
static int luaGetGeneralSettings(lua_State *L)
|
static int luaGetGeneralSettings(lua_State *L)
|
||||||
{
|
{
|
||||||
lua_newtable(L);
|
lua_newtable(L);
|
||||||
@@ -1429,6 +1436,7 @@ const luaL_Reg opentxLib[] = {
|
|||||||
{ "defaultStick", luaDefaultStick },
|
{ "defaultStick", luaDefaultStick },
|
||||||
{ "defaultChannel", luaDefaultChannel },
|
{ "defaultChannel", luaDefaultChannel },
|
||||||
{ "killEvents", luaKillEvents },
|
{ "killEvents", luaKillEvents },
|
||||||
|
{ "GREY", luaGrey },
|
||||||
{ NULL, NULL } /* sentinel */
|
{ NULL, NULL } /* sentinel */
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1439,10 +1447,12 @@ const luaR_value_entry opentxConstants[] = {
|
|||||||
{ "MIDSIZE", MIDSIZE },
|
{ "MIDSIZE", MIDSIZE },
|
||||||
{ "SMLSIZE", SMLSIZE },
|
{ "SMLSIZE", SMLSIZE },
|
||||||
{ "INVERS", INVERS },
|
{ "INVERS", INVERS },
|
||||||
|
{ "BOLD", BOLD },
|
||||||
|
{ "BLINK", BLINK },
|
||||||
|
{ "FIXEDWIDTH", FIXEDWIDTH },
|
||||||
{ "LEFT", LEFT },
|
{ "LEFT", LEFT },
|
||||||
{ "PREC1", PREC1 },
|
{ "PREC1", PREC1 },
|
||||||
{ "PREC2", PREC2 },
|
{ "PREC2", PREC2 },
|
||||||
{ "BLINK", BLINK },
|
|
||||||
{ "VALUE", 0 },
|
{ "VALUE", 0 },
|
||||||
{ "SOURCE", 1 },
|
{ "SOURCE", 1 },
|
||||||
{ "REPLACE", MLTPX_REP },
|
{ "REPLACE", MLTPX_REP },
|
||||||
@@ -1477,6 +1487,9 @@ const luaR_value_entry opentxConstants[] = {
|
|||||||
{ "GREY_DEFAULT", GREY_DEFAULT },
|
{ "GREY_DEFAULT", GREY_DEFAULT },
|
||||||
{ "SOLID", SOLID },
|
{ "SOLID", SOLID },
|
||||||
{ "DOTTED", DOTTED },
|
{ "DOTTED", DOTTED },
|
||||||
|
{ "FORCE", FORCE },
|
||||||
|
{ "ERASE", ERASE },
|
||||||
|
{ "ROUND", ROUND },
|
||||||
{ "LCD_W", LCD_W },
|
{ "LCD_W", LCD_W },
|
||||||
{ "LCD_H", LCD_H },
|
{ "LCD_H", LCD_H },
|
||||||
{ "PLAY_NOW", PLAY_NOW },
|
{ "PLAY_NOW", PLAY_NOW },
|
||||||
|
|||||||
Reference in New Issue
Block a user