From e10cbed69f10d8b1ec45b5955f7fb3b6de5b73a1 Mon Sep 17 00:00:00 2001 From: Bertrand Songis Date: Wed, 11 Jul 2018 22:51:10 +0200 Subject: [PATCH] Fixes #6032 --- radio/src/opentx.cpp | 4 ++-- radio/src/opentx.h | 6 ------ 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/radio/src/opentx.cpp b/radio/src/opentx.cpp index 92baf0835..ab092b73e 100644 --- a/radio/src/opentx.cpp +++ b/radio/src/opentx.cpp @@ -1386,7 +1386,7 @@ uint8_t checkTrim(event_t event) #else before = getRawTrimValue(phase, idx); #endif - thro = (IS_THROTTLE_TRIM(idx) && g_model.thrTrim); + thro = (idx==THR_STICK && g_model.thrTrim); } #else phase = getTrimFlightMode(mixerCurrentFlightMode, idx); @@ -1395,7 +1395,7 @@ uint8_t checkTrim(event_t event) #else before = getRawTrimValue(phase, idx); #endif - thro = (IS_THROTTLE_TRIM(idx) && g_model.thrTrim); + thro = (idx==THR_STICK && g_model.thrTrim); #endif int8_t trimInc = g_model.trimInc + 1; int8_t v = (trimInc==-1) ? min(32, abs(before)/4+1) : (1 << trimInc); // TODO flash saving if (trimInc < 0) diff --git a/radio/src/opentx.h b/radio/src/opentx.h index 7a4195ea1..2fb37381c 100644 --- a/radio/src/opentx.h +++ b/radio/src/opentx.h @@ -334,12 +334,6 @@ void memswap(void * a, void * b, uint8_t size); #define IS_MULTIPOS_CALIBRATED(cal) (false) #endif -#if defined(VIRTUAL_INPUTS) - #define IS_THROTTLE_TRIM(x) (x == virtualInputsTrims[THR_STICK]) -#else - #define IS_THROTTLE_TRIM(x) (x == THR_STICK) -#endif - #if defined(PWR_BUTTON_PRESS) #define pwrOffPressed() pwrPressed() #else