Merge pull request #501 from EdgeTX/main

Merge from main
This commit is contained in:
richardclli
2021-07-26 10:50:32 +08:00
committed by GitHub
19 changed files with 884 additions and 547 deletions
+12
View File
@@ -72,6 +72,18 @@ constexpr bool IS_VIRTUAL_KEY_EVENT(event_t event)
{
return (event & 0xF000) == _MSK_VIRTUAL_KEY;
}
// Touch events for Lua widgets - assuming _MSK_KEY_* for PCBHORUS
constexpr event_t EVT_TOUCH = EVT_VIRTUAL_KEY('t');
constexpr event_t EVT_TOUCH_FIRST = EVT_TOUCH | _MSK_KEY_FIRST;
constexpr event_t EVT_TOUCH_BREAK = EVT_TOUCH | _MSK_KEY_BREAK;
constexpr event_t EVT_TOUCH_SLIDE = EVT_TOUCH | _MSK_KEY_LONG;
constexpr event_t EVT_TOUCH_TAP = EVT_TOUCH | _MSK_KEY_REPT;
constexpr bool IS_TOUCH_EVENT(event_t event)
{
return (event & ~_MSK_KEY_FLAGS) == EVT_TOUCH;
}
#endif
// normal order of events is: FIRST, LONG, REPEAT, REPEAT, ..., BREAK