mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-15 00:33:35 +08:00
Multicopter mixer - Recompute safe roll_pitch_scale if not in air-mode
If not in air-mode the mixer is not able to apply positive boosting and roll_pitch_scale is recomputed to apply symmetric - reduced - thrust. This has the consequence to cut completely the outputs when the thrust is set to zero.
This commit is contained in:
@@ -217,7 +217,6 @@ MultirotorMixer::mix(float *outputs, unsigned space)
|
||||
|
||||
} else if (max_out > 1.0f) {
|
||||
boost = -(max_out - 1.0f);
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
@@ -226,7 +225,13 @@ MultirotorMixer::mix(float *outputs, unsigned space)
|
||||
}
|
||||
|
||||
if (!_airmode) {
|
||||
boost = math::min(boost, 0.0f); // Disable positive boosting if not in air-mode
|
||||
// disable positive boosting if not in air-mode
|
||||
// boosting is positive when min_out < 0.0
|
||||
// roll_pitch_scale is reduced accordingly
|
||||
if (boost > 0.0f) {
|
||||
roll_pitch_scale = thrust / (thrust - min_out);
|
||||
boost = 0.0f;
|
||||
}
|
||||
}
|
||||
|
||||
// capture saturation
|
||||
|
||||
Reference in New Issue
Block a user