Added X-Lite support to CROSSFIRE Lua

This commit is contained in:
Andrey Mironov
2018-06-22 10:11:06 +03:00
parent 14a96e17be
commit 80c2bc7242
2 changed files with 8 additions and 8 deletions
@@ -87,9 +87,9 @@ local function run(event)
return 2
elseif event == EVT_EXIT_BREAK then
return 2
elseif event == EVT_ROT_LEFT then
elseif event == EVT_ROT_LEFT or event == EVT_DOWN_BREAK then
selectDevice(1)
elseif event == EVT_ROT_RIGHT then
elseif event == EVT_ROT_RIGHT or event == EVT_UP_BREAK then
selectDevice(-1)
end
@@ -100,7 +100,7 @@ local function run(event)
else
for i=1, #devices do
local attr = (lineIndex == i and INVERS or 0)
if event == EVT_ROT_BREAK and attr == INVERS then
if (event == EVT_ROT_BREAK or event == EVT_RIGHT_BREAK) and attr == INVERS then
crossfireTelemetryPush(0x28, { devices[i].id, 0xEA })
return "device.lua"
end