forked from Archive/PX4-Autopilot
MC land detector: If no position information is available, rely on the armed state exclusively to infer the landed condition.
This commit is contained in:
parent
5982eaaf34
commit
9a36588361
|
@ -100,6 +100,14 @@ bool MulticopterLandDetector::update()
|
|||
return true;
|
||||
}
|
||||
|
||||
// return status based on armed state if no position lock is available
|
||||
if (_vehicleGlobalPosition.timestamp == 0 ||
|
||||
hrt_elapsed_time(&_vehicleGlobalPosition.timestamp) > 500000) {
|
||||
|
||||
// no position lock - not landed if armed
|
||||
return !_arming.armed;
|
||||
}
|
||||
|
||||
const uint64_t now = hrt_absolute_time();
|
||||
|
||||
// check if we are moving vertically
|
||||
|
|
Loading…
Reference in New Issue