From c1d789d0047e1e720240f1d2f41172f53d6cd91c Mon Sep 17 00:00:00 2001 From: Damjan Adamic Date: Sun, 13 Jul 2014 15:41:18 +0200 Subject: [PATCH] Fixes #1494 --- radio/src/opentx.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/radio/src/opentx.cpp b/radio/src/opentx.cpp index 8e2175e5c..07e7082fa 100644 --- a/radio/src/opentx.cpp +++ b/radio/src/opentx.cpp @@ -1656,11 +1656,7 @@ FORCEINLINE void evalTrims() // do trim -> throttle trim if applicable int16_t trim = getTrimValue(phase, i); if (i==THR_STICK && g_model.thrTrim) { - if (g_model.throttleReversed) - trim = -trim; - int16_t v = getValue(MIXSRC_Thr); - int32_t vv = ((int32_t)trim-TRIM_MIN)*(RESX-v)>>(RESX_SHIFT+1); - trim = vv; + trim = (((g_model.throttleReversed)?(int32_t)(trim+TRIM_MIN):(int32_t)(trim-TRIM_MIN)) * (RESX-getValue(MIXSRC_Thr))) >> (RESX_SHIFT+1); } else if (trimsCheckTimer > 0) { trim = 0;