From 5da2842dbce2a1b21edfcd75f02430b0cc5d5f96 Mon Sep 17 00:00:00 2001 From: bresch Date: Mon, 4 Sep 2017 12:39:56 +0200 Subject: [PATCH] Multicopter mixer - Always unsaturate low-saturated motors when possible --- src/lib/mixer/mixer_multirotor.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/lib/mixer/mixer_multirotor.cpp b/src/lib/mixer/mixer_multirotor.cpp index 8bd087d9a2..35b561c4e6 100644 --- a/src/lib/mixer/mixer_multirotor.cpp +++ b/src/lib/mixer/mixer_multirotor.cpp @@ -210,15 +210,7 @@ MultirotorMixer::mix(float *outputs, unsigned space) // TODO: revise the saturation/boosting strategy if (min_out < 0.0f && max_out < 1.0f && -min_out <= 1.0f - max_out) { - float max_thrust_diff = thrust * thrust_increase_factor - thrust; - - if (max_thrust_diff >= -min_out) { - boost = -min_out; - - } else { - boost = max_thrust_diff; - roll_pitch_scale = (thrust + boost) / (thrust - min_out); - } + boost = -min_out; } else if (max_out > 1.0f && min_out > 0.0f && min_out >= max_out - 1.0f) { float max_thrust_diff = thrust - thrust_decrease_factor * thrust;