[NV14] Use trim hats to emulate key events when standalone lua script running (#985)
* Preliminary trims as keys for lua Largely based on open-flysky implementation * Add `isLuaStandaloneRunning()` * Add more virtual events * Tweak virtual events further * Finish remapping keys to virtual events * Move some virtuals to right trim hat * Add missing "defined" * Revert to common EVT_VIRTUAL_MENU mapping * Make keys/trims reset backlight like other radios
This commit is contained in:
@@ -240,6 +240,9 @@ struct LuaMemTracer {
|
||||
|
||||
void * tracer_alloc(void * ud, void * ptr, size_t osize, size_t nsize);
|
||||
|
||||
inline bool isLuaStandaloneRunning() {
|
||||
return scriptInternalData[0].reference == SCRIPT_STANDALONE;
|
||||
}
|
||||
#else // defined(LUA)
|
||||
|
||||
#define luaInit()
|
||||
|
||||
Reference in New Issue
Block a user