@@ -1083,12 +1083,13 @@ Stops key state machine. See [Key Events](../key_events.md) for the detailed des
|
||||
*/
|
||||
static int luaKillEvents(lua_State * L)
|
||||
{
|
||||
uint8_t key = EVT_KEY_MASK(luaL_checkinteger(L, 1));
|
||||
event_t key = EVT_KEY_MASK(luaL_checkinteger(L, 1));
|
||||
// prevent killing maskable keys (only in telemetry scripts)
|
||||
// TODO add which tpye of script is running before p_call()
|
||||
// TODO add which type of script is running before lua_resume()
|
||||
if (IS_MASKABLE(key)) {
|
||||
killEvents(key);
|
||||
}
|
||||
luaEmptyEventBuffer();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1862,6 +1863,7 @@ const luaR_value_entry opentxConstants[] = {
|
||||
#endif
|
||||
#if defined(COLORLCD)
|
||||
{ "BOLD", FONT(BOLD) },
|
||||
{ "VCENTER", VCENTERED },
|
||||
#else
|
||||
{ "BOLD", BOLD },
|
||||
#endif
|
||||
@@ -2099,6 +2101,13 @@ const luaR_value_entry opentxConstants[] = {
|
||||
{ "EVT_ROT_RIGHT", EVT_ROTARY_RIGHT },
|
||||
#endif
|
||||
|
||||
#if defined(HARDWARE_TOUCH)
|
||||
{ "EVT_TOUCH_FIRST", EVT_TOUCH_FIRST },
|
||||
{ "EVT_TOUCH_BREAK", EVT_TOUCH_BREAK },
|
||||
{ "EVT_TOUCH_SLIDE", EVT_TOUCH_SLIDE },
|
||||
{ "EVT_TOUCH_TAP", EVT_TOUCH_TAP },
|
||||
#endif
|
||||
|
||||
#if LCD_DEPTH > 1 && !defined(COLORLCD)
|
||||
{ "FILL_WHITE", FILL_WHITE },
|
||||
{ "GREY_DEFAULT", GREY_DEFAULT },
|
||||
|
||||
Reference in New Issue
Block a user