Browse Source

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.
sbg
Julian Oes 9 years ago
parent
commit
93acff8641
  1. 2
      src/modules/land_detector/MulticopterLandDetector.cpp

2
src/modules/land_detector/MulticopterLandDetector.cpp

@ -203,7 +203,7 @@ bool MulticopterLandDetector::get_landed_state() @@ -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;

Loading…
Cancel
Save