From 11a4410500c3eb2f8038afae4d9e4d28c219b60c Mon Sep 17 00:00:00 2001 From: Dennis Mannhart Date: Fri, 5 May 2017 11:00:53 +0200 Subject: [PATCH] mc_pos_control: revert protection against nan thrust sp --- src/modules/mc_pos_control/mc_pos_control_main.cpp | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/modules/mc_pos_control/mc_pos_control_main.cpp b/src/modules/mc_pos_control/mc_pos_control_main.cpp index f87ff52f02..da2da8ee1f 100644 --- a/src/modules/mc_pos_control/mc_pos_control_main.cpp +++ b/src/modules/mc_pos_control/mc_pos_control_main.cpp @@ -2042,17 +2042,6 @@ MulticopterPositionControl::calculate_thrust_setpoint(float dt) thrust_sp(2) *= att_comp; } - /* if any of thrust sp is not finite, it is safest to send out hover thrust*/ - for (int i = 0; i < 3; ++i) { - if (!PX4_ISFINITE(thrust_sp(i))) { - thrust_sp(0) = 0.0f; - thrust_sp(1) = 0.0f; - thrust_sp(2) = -_params.thr_hover; - PX4_WARN("Caught invalid thrust setpoint"); - break; - } - } - /* Calculate desired total thrust amount in body z direction. */ /* To compensate for excess thrust during attitude tracking errors we * project the desired thrust force vector F onto the real vehicle's thrust axis in NED: