From c250fb0a9e2e009b9ad1668e436b8cd109e47f1d Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Tue, 15 Aug 2017 11:02:47 -0400 Subject: [PATCH] land detector FW round get_max_altitude() - this prevents constant land detector publications --- src/modules/land_detector/FixedwingLandDetector.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/land_detector/FixedwingLandDetector.cpp b/src/modules/land_detector/FixedwingLandDetector.cpp index 66882dc822..53fdbffc95 100644 --- a/src/modules/land_detector/FixedwingLandDetector.cpp +++ b/src/modules/land_detector/FixedwingLandDetector.cpp @@ -87,7 +87,7 @@ float FixedwingLandDetector::_get_max_altitude() // TODO // This means no altitude limit as the limit // is always current position plus 1000 meters - return -_controlState.z_pos + 1000; + return roundf(-_controlState.z_pos + 1000); } bool FixedwingLandDetector::_get_freefall_state()