From e0d81b4c5e0f98d0e0f031242057e5497930213f Mon Sep 17 00:00:00 2001 From: Dennis Mannhart Date: Wed, 7 Jun 2017 15:44:32 +0200 Subject: [PATCH] mc_pos_control: if triplet not valid in z ignore it --- src/modules/mc_pos_control/mc_pos_control_main.cpp | 3 --- 1 file changed, 3 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 601f8368eb..11a2039f1e 100644 --- a/src/modules/mc_pos_control/mc_pos_control_main.cpp +++ b/src/modules/mc_pos_control/mc_pos_control_main.cpp @@ -1398,8 +1398,6 @@ void MulticopterPositionControl::control_auto(float dt) if (PX4_ISFINITE(_pos_sp_triplet.current.alt)) { _curr_pos_sp(2) = -(_pos_sp_triplet.current.alt - _ref_alt); - } else { - _curr_pos_sp(2) = _pos(2); } if (PX4_ISFINITE(_curr_pos_sp(0)) && @@ -1552,7 +1550,6 @@ void MulticopterPositionControl::control_auto(float dt) _att_sp.yaw_body = _pos_sp_triplet.current.yaw; } - /* * if we're already near the current takeoff setpoint don't reset in case we switch back to posctl. * this makes the takeoff finish smoothly.