mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-24 11:53:34 +08:00
HelicopterCoaxial: only publish unallocated thrust in the saturation case
This commit is contained in:
+12
@@ -185,6 +185,9 @@ void ActuatorEffectivenessHelicopterCoaxial::getUnallocatedControl(int matrix_in
|
|||||||
|
|
||||||
} else if (_saturation_flags.roll_neg) {
|
} else if (_saturation_flags.roll_neg) {
|
||||||
status.unallocated_torque[0] = -1.f;
|
status.unallocated_torque[0] = -1.f;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
status.unallocated_torque[0] = 0.f;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_saturation_flags.pitch_pos) {
|
if (_saturation_flags.pitch_pos) {
|
||||||
@@ -192,6 +195,9 @@ void ActuatorEffectivenessHelicopterCoaxial::getUnallocatedControl(int matrix_in
|
|||||||
|
|
||||||
} else if (_saturation_flags.pitch_neg) {
|
} else if (_saturation_flags.pitch_neg) {
|
||||||
status.unallocated_torque[1] = -1.f;
|
status.unallocated_torque[1] = -1.f;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
status.unallocated_torque[1] = 0.f;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_saturation_flags.yaw_pos) {
|
if (_saturation_flags.yaw_pos) {
|
||||||
@@ -199,6 +205,9 @@ void ActuatorEffectivenessHelicopterCoaxial::getUnallocatedControl(int matrix_in
|
|||||||
|
|
||||||
} else if (_saturation_flags.yaw_neg) {
|
} else if (_saturation_flags.yaw_neg) {
|
||||||
status.unallocated_torque[2] = -1.f;
|
status.unallocated_torque[2] = -1.f;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
status.unallocated_torque[2] = 0.f;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_saturation_flags.thrust_pos) {
|
if (_saturation_flags.thrust_pos) {
|
||||||
@@ -206,5 +215,8 @@ void ActuatorEffectivenessHelicopterCoaxial::getUnallocatedControl(int matrix_in
|
|||||||
|
|
||||||
} else if (_saturation_flags.thrust_neg) {
|
} else if (_saturation_flags.thrust_neg) {
|
||||||
status.unallocated_thrust[2] = -1.f;
|
status.unallocated_thrust[2] = -1.f;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
status.unallocated_torque[2] = 0.f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user