From 15469aeaf7f8579c5c533cf16d8004c2bed3e610 Mon Sep 17 00:00:00 2001 From: Bertrand Songis Date: Wed, 5 Aug 2015 21:37:22 +0200 Subject: [PATCH] Fixes #2643 --- radio/src/gui/Taranis/menu_model_inputs_mixes.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/radio/src/gui/Taranis/menu_model_inputs_mixes.cpp b/radio/src/gui/Taranis/menu_model_inputs_mixes.cpp index fefe12718..d6639b0e8 100644 --- a/radio/src/gui/Taranis/menu_model_inputs_mixes.cpp +++ b/radio/src/gui/Taranis/menu_model_inputs_mixes.cpp @@ -753,7 +753,6 @@ void menuModelExpoMix(uint8_t expo, uint8_t event) } // no break - CASE_EVT_ROTARY_BREAK case EVT_KEY_LONG(KEY_ENTER): killEvents(event); if (s_copyTgtOfs) { @@ -806,23 +805,23 @@ void menuModelExpoMix(uint8_t expo, uint8_t event) case EVT_KEY_REPT(KEY_MOVE_DOWN): if (s_copyMode) { uint8_t key = (event & 0x1f); - uint8_t next_ofs = ((IS_ROTARY_UP(event) || key==KEY_MOVE_UP) ? s_copyTgtOfs - 1 : s_copyTgtOfs + 1); + uint8_t next_ofs = (key==KEY_MOVE_UP ? s_copyTgtOfs - 1 : s_copyTgtOfs + 1); if (s_copyTgtOfs==0 && s_copyMode==COPY_MODE) { // insert a mix on the same channel (just above / just below) if (reachExpoMixCountLimit(expo)) break; copyExpoMix(expo, s_currIdx); - if (IS_ROTARY_DOWN(event) || key==KEY_MOVE_DOWN) s_currIdx++; + if (key==KEY_MOVE_DOWN) s_currIdx++; else if (sub-s_pgOfs >= 6) s_pgOfs++; } else if (next_ofs==0 && s_copyMode==COPY_MODE) { // delete the mix deleteExpoMix(expo, s_currIdx); - if (IS_ROTARY_UP(event) || key==KEY_MOVE_UP) s_currIdx--; + if (key==KEY_MOVE_UP) s_currIdx--; } else { // only swap the mix with its neighbor - if (!swapExpoMix(expo, s_currIdx, IS_ROTARY_UP(event) || key==KEY_MOVE_UP)) break; + if (!swapExpoMix(expo, s_currIdx, key==KEY_MOVE_UP)) break; eeDirty(EE_MODEL); }