aboutsummaryrefslogtreecommitdiff
path: root/src/modules/fw_att_control
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/fw_att_control')
-rw-r--r--src/modules/fw_att_control/fw_att_control_main.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/modules/fw_att_control/fw_att_control_main.cpp b/src/modules/fw_att_control/fw_att_control_main.cpp
index 517333c80..7cf721a35 100644
--- a/src/modules/fw_att_control/fw_att_control_main.cpp
+++ b/src/modules/fw_att_control/fw_att_control_main.cpp
@@ -860,8 +860,12 @@ FixedwingAttitudeControl::task_main()
}
}
- /* throttle passed through */
- _actuators.control[3] = (isfinite(throttle_sp)) ? throttle_sp : 0.0f;
+ /* throttle passed through if it is finite and if no engine failure was
+ * detected */
+ _actuators.control[3] = (isfinite(throttle_sp) &&
+ !(_vehicle_status.engine_failure ||
+ _vehicle_status.engine_failure_cmd)) ?
+ throttle_sp : 0.0f;
if (!isfinite(throttle_sp)) {
if (_debug && loop_counter % 10 == 0) {
warnx("throttle_sp %.4f", (double)throttle_sp);