From 4d44eb97f520dd9143cf34b13f25ae2ed0ca1064 Mon Sep 17 00:00:00 2001 From: 3djc Date: Mon, 12 Sep 2016 11:49:58 +0200 Subject: [PATCH] Add rotary encoder support (#3792) --- radio/sdcard/taranis/S6R/S6R.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/radio/sdcard/taranis/S6R/S6R.lua b/radio/sdcard/taranis/S6R/S6R.lua index d4ea222e0..c8cd1edf5 100644 --- a/radio/sdcard/taranis/S6R/S6R.lua +++ b/radio/sdcard/taranis/S6R/S6R.lua @@ -214,15 +214,15 @@ local function runFieldsPage(event) end end elseif edit then - if event == EVT_PLUS_FIRST or event == EVT_PLUS_REPT then + if event == EVT_PLUS_FIRST or event == EVT_ROT_RIGHT or event == EVT_PLUS_REPT then addField(1) - elseif event == EVT_MINUS_FIRST or event == EVT_MINUS_REPT then + elseif event == EVT_MINUS_FIRST or event == EVT_ROT_LEFT or event == EVT_MINUS_REPT then addField(-1) end else - if event == EVT_MINUS_FIRST then + if event == EVT_MINUS_FIRST or event == EVT_ROT_LEFT then selectField(1) - elseif event == EVT_PLUS_FIRST then + elseif event == EVT_PLUS_FIRST or event == EVT_ROT_RIGHT then selectField(-1) end end @@ -241,7 +241,7 @@ local function runConfigPage(event) end if fields[2][4] ~= nil then lcd.drawPixmap(128, 28, mountBitmaps[1 + fields[2][4]]) - end + end return result end @@ -278,7 +278,7 @@ local function runCalibrationPage(event) else return 2 end - end + end return 0 end