mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-22 01:12:31 +00:00
land_detector : use INFINITY when altitude limiting is not needed
This commit is contained in:
committed by
Lorenz Meier
parent
31aa1cbf01
commit
1a2f9dd37a
@@ -109,7 +109,7 @@ void LandDetector::_cycle()
|
|||||||
const bool freefallDetected = (_state == LandDetectionState::FREEFALL);
|
const bool freefallDetected = (_state == LandDetectionState::FREEFALL);
|
||||||
const bool maybe_landedDetected = (_state == LandDetectionState::MAYBE_LANDED);
|
const bool maybe_landedDetected = (_state == LandDetectionState::MAYBE_LANDED);
|
||||||
const bool ground_contactDetected = (_state == LandDetectionState::GROUND_CONTACT);
|
const bool ground_contactDetected = (_state == LandDetectionState::GROUND_CONTACT);
|
||||||
const float alt_max = _get_max_altitude();
|
const float alt_max = _get_max_altitude() > 0.0f ? _get_max_altitude() : INFINITY;
|
||||||
|
|
||||||
const hrt_abstime now = hrt_absolute_time();
|
const hrt_abstime now = hrt_absolute_time();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user