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.
This commit is contained in:
Matthias Grob 2017-02-09 11:44:45 +01:00 committed by Lorenz Meier
parent b5858e729c
commit c559f195ec

View File

@ -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;
}