forked from Archive/PX4-Autopilot
land_detector : use INFINITY when altitude limiting is not needed
This commit is contained in:
parent
31aa1cbf01
commit
1a2f9dd37a
|
@ -109,7 +109,7 @@ void LandDetector::_cycle()
|
|||
const bool freefallDetected = (_state == LandDetectionState::FREEFALL);
|
||||
const bool maybe_landedDetected = (_state == LandDetectionState::MAYBE_LANDED);
|
||||
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();
|
||||
|
||||
|
|
Loading…
Reference in New Issue