From 096e2ec6293eab5b93187454b63c4ad585376629 Mon Sep 17 00:00:00 2001 From: bresch Date: Mon, 4 Sep 2017 12:51:48 +0200 Subject: [PATCH] Multicopter mixer - Always unsaturate high-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 4134dd0c51..c452c109db 100644 --- a/src/lib/mixer/mixer_multirotor.cpp +++ b/src/lib/mixer/mixer_multirotor.cpp @@ -213,15 +213,7 @@ MultirotorMixer::mix(float *outputs, unsigned space) boost = -min_out; } else if (max_out > 1.0f && min_out > 0.0f && max_out - min_out <= 1.0f) { - float max_thrust_diff = thrust - thrust_decrease_factor * thrust; - - if (max_thrust_diff >= max_out - 1.0f) { - boost = -(max_out - 1.0f); - - } else { - boost = -max_thrust_diff; - roll_pitch_scale = (1 - (thrust + boost)) / (max_out - thrust); - } + boost = -(max_out - 1.0f); } else if (min_out < 0.0f && max_out < 1.0f && max_out - min_out > 1.0f) { float max_thrust_diff = thrust * thrust_increase_factor - thrust;