From c559f195eca9a0fd565825172bfd6e54586befea Mon Sep 17 00:00:00 2001 From: Matthias Grob Date: Thu, 9 Feb 2017 11:44:45 +0100 Subject: [PATCH] land_detector: Hotfix to prevent ground contact detection when descending velocity is very slow with manual stick all the way down Now the stick down check is only done in manual control and the thrust low is again mandatory to detect ground in any case. --- src/modules/land_detector/MulticopterLandDetector.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/land_detector/MulticopterLandDetector.cpp b/src/modules/land_detector/MulticopterLandDetector.cpp index c9d43d6d9c..935cd6b64f 100644 --- a/src/modules/land_detector/MulticopterLandDetector.cpp +++ b/src/modules/land_detector/MulticopterLandDetector.cpp @@ -175,7 +175,7 @@ bool MulticopterLandDetector::_get_ground_contact_state() // If pilots commands fully down or already below minimal thrust because of auto land and we do not move down we assume ground contact // TODO: we need an accelerometer based check for vertical movement for flying without GPS - if ((manual_control_move_down || _get_minimal_thrust()) && + if (((manual_control_move_down || !_control_mode.flag_control_manual_enabled) && _get_minimal_thrust()) && (!verticalMovement || !_get_position_lock_available())) { return true; }