From 4692ccf287faca5b6396a2ff2fa52c6d6e47353f Mon Sep 17 00:00:00 2001 From: Dennis Mannhart Date: Tue, 6 Jun 2017 16:52:26 +0200 Subject: [PATCH] mc_pos_control: ignore maybe_landed and ground_contact for takeoff setpoint --- src/modules/mc_pos_control/mc_pos_control_main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 4f09ddb8c7..10da262e3a 100644 --- a/src/modules/mc_pos_control/mc_pos_control_main.cpp +++ b/src/modules/mc_pos_control/mc_pos_control_main.cpp @@ -1828,7 +1828,8 @@ MulticopterPositionControl::calculate_thrust_setpoint(float dt) thrust_sp = _R * thrust_sp_body; } - if (_vehicle_land_detected.maybe_landed) { + if (_vehicle_land_detected.maybe_landed + && !(_pos_sp_triplet.current.type == position_setpoint_s::SETPOINT_TYPE_TAKEOFF)) { /* we set thrust to zero * this will help to decide if we are actually landed or not */