mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-23 22:58:10 +08:00
Multicopter mixer - Always unsaturate high-saturated motors when possible
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user