From 93acff86414d202bf643f8bf04a17f69b7e95439 Mon Sep 17 00:00:00 2001 From: Julian Oes Date: Sun, 17 Jul 2016 16:30:06 +0100 Subject: [PATCH] MulticopterLandDetector: remove always true call The result from `!get_freefall_state()` was always true because `get_freefall_state()` is already called before `get_landed_state()` is called. Only if we're not in a freefall, we check if we are landed. --- 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 b09823a06e..7cc57818af 100644 --- a/src/modules/land_detector/MulticopterLandDetector.cpp +++ b/src/modules/land_detector/MulticopterLandDetector.cpp @@ -203,7 +203,7 @@ bool MulticopterLandDetector::get_landed_state() // quite acrobatic flight. if ((_min_trust_start > 0) && (hrt_elapsed_time(&_min_trust_start) > 8 * 1000 * 1000)) { - return !get_freefall_state(); + return true; } else { return false;