diff --git a/radio/sdcard/horus/CROSSFIRE/crossfire.lua b/radio/sdcard/horus/CROSSFIRE/crossfire.lua index 6606f0aaa..c4d71f1b9 100644 --- a/radio/sdcard/horus/CROSSFIRE/crossfire.lua +++ b/radio/sdcard/horus/CROSSFIRE/crossfire.lua @@ -87,11 +87,11 @@ local function run(event) if event == nil then error("Cannot be run as a model script!") return 2 - elseif event == EVT_EXIT_BREAK then + elseif event == EVT_VIRTUAL_EXIT then return 2 - elseif event == EVT_ROT_LEFT then + elseif event == EVT_VIRTUAL_NEXT then selectDevice(1) - elseif event == EVT_ROT_RIGHT then + elseif event == EVT_VIRTUAL_PREVIOUS then selectDevice(-1) end @@ -105,7 +105,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_VIRTUAL_ENTER and attr == INVERS then crossfireTelemetryPush(0x28, { devices[i].id, 0xEA }) return "device.lua" end diff --git a/radio/sdcard/horus/CROSSFIRE/device.lua b/radio/sdcard/horus/CROSSFIRE/device.lua index 811f01847..e733dc5a6 100644 --- a/radio/sdcard/horus/CROSSFIRE/device.lua +++ b/radio/sdcard/horus/CROSSFIRE/device.lua @@ -435,7 +435,7 @@ local function runDevicePage(event) else return "crossfire.lua" end - elseif event == EVT_ROT_BREAK then -- toggle editing/selecting current field + elseif event == EVT_VIRTUAL_EXIT then -- toggle editing/selecting current field local field = getField(lineIndex) if field.name then if field.type == 10 then @@ -456,15 +456,15 @@ local function runDevicePage(event) end end elseif edit then - if event == EVT_ROT_LEFT then + if event == EVT_VIRTUAL_NEXT then incrField(1) - elseif event == EVT_ROT_RIGHT then + elseif event == EVT_VIRTUAL_PREVIOUS then incrField(-1) end else - if event == EVT_ROT_RIGHT then + if event == EVT_VIRTUAL_NEXT then selectField(1) - elseif event == EVT_ROT_LEFT then + elseif event == EVT_VIRTUAL_PREVIOUS then selectField(-1) end end diff --git a/radio/sdcard/taranis-x7/SCRIPTS/TOOLS/CROSSFIRE/crossfire.lua b/radio/sdcard/taranis-x7/SCRIPTS/TOOLS/CROSSFIRE/crossfire.lua index 600ff56d8..f68c4db3d 100644 --- a/radio/sdcard/taranis-x7/SCRIPTS/TOOLS/CROSSFIRE/crossfire.lua +++ b/radio/sdcard/taranis-x7/SCRIPTS/TOOLS/CROSSFIRE/crossfire.lua @@ -86,11 +86,11 @@ local function run(event) if event == nil then error("Cannot be run as a model script!") return 2 - elseif event == EVT_EXIT_BREAK then + elseif event == EVT_VIRTUAL_EXIT then return 2 - elseif event == EVT_ROT_LEFT or event == EVT_DOWN_BREAK then + elseif event == EVT_VIRTUAL_NEXT then selectDevice(1) - elseif event == EVT_ROT_RIGHT or event == EVT_UP_BREAK then + elseif event == EVT_VIRTUAL_PREVIOUS then selectDevice(-1) end @@ -101,7 +101,7 @@ local function run(event) else for i=1, #devices do local attr = (lineIndex == i and INVERS or 0) - if (event == EVT_ROT_BREAK or event == EVT_RIGHT_BREAK) and attr == INVERS then + if event == EVT_VIRTUAL_ENTER and attr == INVERS then crossfireTelemetryPush(0x28, { devices[i].id, 0xEA }) return "device.lua" end diff --git a/radio/sdcard/taranis-x7/SCRIPTS/TOOLS/CROSSFIRE/device.lua b/radio/sdcard/taranis-x7/SCRIPTS/TOOLS/CROSSFIRE/device.lua index 616f23842..27900f5b1 100644 --- a/radio/sdcard/taranis-x7/SCRIPTS/TOOLS/CROSSFIRE/device.lua +++ b/radio/sdcard/taranis-x7/SCRIPTS/TOOLS/CROSSFIRE/device.lua @@ -419,7 +419,7 @@ end -- Main local function runDevicePage(event) - if event == EVT_EXIT_BREAK then -- exit script + if event == EVT_VIRTUAL_EXIT then -- exit script if edit == true then edit = false local field = getField(lineIndex) @@ -430,7 +430,7 @@ local function runDevicePage(event) else return "crossfire.lua" end - elseif event == EVT_ROT_BREAK or event == EVT_RIGHT_BREAK then -- toggle editing/selecting current field + elseif event == EVT_VIRTUAL_ENTER then -- toggle editing/selecting current field local field = getField(lineIndex) if field.name then if field.type == 10 then @@ -451,15 +451,15 @@ local function runDevicePage(event) end end elseif edit then - if event == EVT_ROT_RIGHT or event == EVT_DOWN_BREAK then + if event == EVT_VIRTUAL_NEXT or event == EVT_VIRTUAL_NEXT_REPT then incrField(1) - elseif event == EVT_ROT_LEFT or event == EVT_UP_BREAK then + elseif event == EVT_VIRTUAL_PREVIOUS or event == EVT_VIRTUAL_PREVIOUS_REPT then incrField(-1) end else - if event == EVT_ROT_RIGHT or event == EVT_DOWN_BREAK then + if event == EVT_VIRTUAL_NEXT then selectField(1) - elseif event == EVT_ROT_LEFT or event == EVT_UP_BREAK then + elseif event == EVT_VIRTUAL_PREVIOUS then selectField(-1) end end diff --git a/radio/sdcard/taranis-x9/SCRIPTS/TOOLS/CROSSFIRE/crossfire.lua b/radio/sdcard/taranis-x9/SCRIPTS/TOOLS/CROSSFIRE/crossfire.lua index 47bb8d31c..f68c4db3d 100644 --- a/radio/sdcard/taranis-x9/SCRIPTS/TOOLS/CROSSFIRE/crossfire.lua +++ b/radio/sdcard/taranis-x9/SCRIPTS/TOOLS/CROSSFIRE/crossfire.lua @@ -86,11 +86,11 @@ local function run(event) if event == nil then error("Cannot be run as a model script!") return 2 - elseif event == EVT_EXIT_BREAK then + elseif event == EVT_VIRTUAL_EXIT then return 2 - elseif event == EVT_PLUS_FIRST or event == EVT_PLUS_REPT or event == EVT_ROT_RIGHT then + elseif event == EVT_VIRTUAL_NEXT then selectDevice(1) - elseif event == EVT_MINUS_FIRST or event == EVT_MINUS_REPT or event == EVT_ROT_LEFT then + elseif event == EVT_VIRTUAL_PREVIOUS then selectDevice(-1) end @@ -101,7 +101,7 @@ local function run(event) else for i=1, #devices do local attr = (lineIndex == i and INVERS or 0) - if event == EVT_ENTER_BREAK and attr == INVERS then + if event == EVT_VIRTUAL_ENTER and attr == INVERS then crossfireTelemetryPush(0x28, { devices[i].id, 0xEA }) return "device.lua" end diff --git a/radio/sdcard/taranis-x9/SCRIPTS/TOOLS/CROSSFIRE/device.lua b/radio/sdcard/taranis-x9/SCRIPTS/TOOLS/CROSSFIRE/device.lua index 2a1d8b7b8..ee3f87958 100644 --- a/radio/sdcard/taranis-x9/SCRIPTS/TOOLS/CROSSFIRE/device.lua +++ b/radio/sdcard/taranis-x9/SCRIPTS/TOOLS/CROSSFIRE/device.lua @@ -419,7 +419,7 @@ end -- Main local function runDevicePage(event) - if event == EVT_EXIT_BREAK then -- exit script + if event == EVT_VIRTUAL_EXIT then -- exit script if edit == true then edit = false local field = getField(lineIndex) @@ -430,7 +430,7 @@ local function runDevicePage(event) else return "crossfire.lua" end - elseif event == EVT_ENTER_BREAK then -- toggle editing/selecting current field + elseif event == EVT_VIRTUAL_ENTER then -- toggle editing/selecting current field local field = getField(lineIndex) if field.name then if field.type == 10 then @@ -451,15 +451,15 @@ local function runDevicePage(event) end end elseif edit then - if event == EVT_PLUS_FIRST or event == EVT_PLUS_REPT or event == EVT_ROT_LEFT then + if event == EVT_VIRTUAL_NEXT or event == EVT_VIRTUAL_NEXT_REPT then incrField(1) - elseif event == EVT_MINUS_FIRST or event == EVT_MINUS_REPT or event == EVT_ROT_RIGHT then + elseif event == EVT_VIRTUAL_PREVIOUS or event == EVT_VIRTUAL_PREVIOUS_REPT then incrField(-1) end else - if event == EVT_MINUS_FIRST or event == EVT_ROT_RIGHT then + if event == EVT_VIRTUAL_NEXT then selectField(1) - elseif event == EVT_PLUS_FIRST or event == EVT_ROT_LEFT then + elseif event == EVT_VIRTUAL_PREVIOUS then selectField(-1) end end