From 493c41c76e82b2d66f348849cc642975977d188a Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Mon, 5 Mar 2018 15:16:52 -0500 Subject: [PATCH] VtolLandDetector require vehicle_status timestamp --- src/modules/land_detector/VtolLandDetector.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/land_detector/VtolLandDetector.cpp b/src/modules/land_detector/VtolLandDetector.cpp index 0be1d2540b..dca9433455 100644 --- a/src/modules/land_detector/VtolLandDetector.cpp +++ b/src/modules/land_detector/VtolLandDetector.cpp @@ -70,7 +70,7 @@ void VtolLandDetector::_update_topics() bool VtolLandDetector::_get_maybe_landed_state() { // Only trigger in RW mode - if (!_vehicle_status.is_rotary_wing) { + if ((_vehicle_status.timestamp != 0) && !_vehicle_status.is_rotary_wing) { return false; } @@ -80,7 +80,7 @@ bool VtolLandDetector::_get_maybe_landed_state() bool VtolLandDetector::_get_landed_state() { // Only trigger in RW mode - if (!_vehicle_status.is_rotary_wing) { + if ((_vehicle_status.timestamp != 0) && !_vehicle_status.is_rotary_wing) { return false; }