From acfb88ac7ba08d67679eaba4cca8fdcf95e0883d Mon Sep 17 00:00:00 2001 From: bsongis Date: Mon, 3 Sep 2012 20:52:39 +0000 Subject: [PATCH] Issue 34 better fix Issue 126 fixed --- src/open9x.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/open9x.cpp b/src/open9x.cpp index b5c63fe07..f8c4ce9f7 100644 --- a/src/open9x.cpp +++ b/src/open9x.cpp @@ -2367,7 +2367,12 @@ inline void doMixerCalculations(tmr10ms_t tmr10ms, uint8_t tick10ms) val = calibratedStick[THR_STICK]; // get throttle channel value } else if (g_model.thrTraceSrc > NUM_POTS) { - val = ex_chans[g_model.thrTraceSrc-NUM_POTS-1] / 2; + uint8_t ch = g_model.thrTraceSrc-NUM_POTS-1; + val = g_chans512[ch]; + if (g_model.limitData[ch].revert) + val = -val + calc100toRESX(g_model.limitData[ch].max + 100) - RESX; + else + val = val - calc100toRESX(g_model.limitData[ch].min - 100) - RESX; } else { val = calibratedStick[g_model.thrTraceSrc+NUM_STICKS-1];