From 508ffa1b390890a980a912b26c50db835054ce4c Mon Sep 17 00:00:00 2001 From: Mark Sauder Date: Wed, 2 Oct 2019 14:31:06 -0600 Subject: [PATCH] land_detector: Remove recently added vehicle_attitude.timestamp check from MulticopterLandDetector::_get_maybe_landed_state(). (#13072) PR #12681 added a check to the MulticopterLandDetector::_get_maybe_landed_state() method for a valid vehicle_attitude.timstamp value to finish work in PR #9756. It was discovered that the addition of that check leaves it possible to fly in acro mode without a valid attitude and auto-disarm can engage, allowing the multicopter to fall out of the sky. --- 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 4348a47ebd..4a8ed5fcc6 100644 --- a/src/modules/land_detector/MulticopterLandDetector.cpp +++ b/src/modules/land_detector/MulticopterLandDetector.cpp @@ -178,7 +178,7 @@ bool MulticopterLandDetector::_get_maybe_landed_state() const hrt_abstime now = hrt_absolute_time(); // When not armed, consider to be maybe-landed - if (!_actuator_armed.armed || (_vehicle_attitude.timestamp == 0)) { + if (!_actuator_armed.armed) { return true; }