From 35864841ba463177093e4e7e1e40f58c5300028a Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Sun, 30 Apr 2017 21:55:31 -0400 Subject: [PATCH] FixedwingPositionControl remove engine failure thrust sp - this is already done in fw_att_control --- .../fw_pos_control_l1/FixedwingPositionControl.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/modules/fw_pos_control_l1/FixedwingPositionControl.cpp b/src/modules/fw_pos_control_l1/FixedwingPositionControl.cpp index 8082abdcff..1412a9afd0 100644 --- a/src/modules/fw_pos_control_l1/FixedwingPositionControl.cpp +++ b/src/modules/fw_pos_control_l1/FixedwingPositionControl.cpp @@ -1375,14 +1375,10 @@ FixedwingPositionControl::control_position(const math::Vector<2> &curr_pos, cons } /* Copy thrust output for publication */ - if (_vehicle_status.engine_failure || _vehicle_status.engine_failure_cmd) { - /* Set thrust to 0 to minimize damage */ - _att_sp.thrust = 0.0f; - - } else if (_control_mode_current == FW_POSCTRL_MODE_AUTO && // launchdetector only available in auto - pos_sp_curr.type == position_setpoint_s::SETPOINT_TYPE_TAKEOFF && - _launch_detection_state != LAUNCHDETECTION_RES_DETECTED_ENABLEMOTORS && - !_runway_takeoff.runwayTakeoffEnabled()) { + if (_control_mode_current == FW_POSCTRL_MODE_AUTO && // launchdetector only available in auto + pos_sp_curr.type == position_setpoint_s::SETPOINT_TYPE_TAKEOFF && + _launch_detection_state != LAUNCHDETECTION_RES_DETECTED_ENABLEMOTORS && + !_runway_takeoff.runwayTakeoffEnabled()) { /* making sure again that the correct thrust is used, * without depending on library calls for safety reasons.