From 8f5169c9ec7ac019e2f00976ca301fd326445b4b Mon Sep 17 00:00:00 2001 From: bsongis Date: Wed, 2 Apr 2014 18:14:35 +0200 Subject: [PATCH] Bad rounding with negative values (99% weight on a negative source). Saves even flash on stock 9x board. --- radio/src/opentx.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/radio/src/opentx.cpp b/radio/src/opentx.cpp index e7740be1e..02e648989 100644 --- a/radio/src/opentx.cpp +++ b/radio/src/opentx.cpp @@ -4147,7 +4147,7 @@ void doMixerCalculations() // interpolate value with min/max so we get smooth motion from center to stop // this limits based on v original values and min=-1024, max=1024 RESX=1024 int32_t q = (s_fade_flight_phases ? (sum_chans512[i] / weight) << 4 : chans[i]); - ex_chans[i] = q>>8; // for the next perMain + ex_chans[i] = q / 256; int16_t value = applyLimits(i, q); // applyLimits will remove the 256 100% basis