From 1b2403a87f31e240962d97bf82efda80e5d0cab4 Mon Sep 17 00:00:00 2001 From: Silvan Fuhrer Date: Thu, 22 Aug 2019 15:41:51 +0200 Subject: [PATCH] VTOL land detector: trigger land detector in fixed-wing mode if disarmed. Signed-off-by: Silvan Fuhrer --- src/modules/land_detector/VtolLandDetector.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/modules/land_detector/VtolLandDetector.cpp b/src/modules/land_detector/VtolLandDetector.cpp index 14eef41427..407bf47f6f 100644 --- a/src/modules/land_detector/VtolLandDetector.cpp +++ b/src/modules/land_detector/VtolLandDetector.cpp @@ -59,9 +59,9 @@ void VtolLandDetector::_update_topics() bool VtolLandDetector::_get_maybe_landed_state() { - // Only trigger in RW mode + // If in Fixed-wing mode, only trigger if disarmed if ((_vehicle_status.timestamp != 0) && _vehicle_status.vehicle_type == vehicle_status_s::VEHICLE_TYPE_FIXED_WING) { - return false; + return !_actuator_armed.armed; } return MulticopterLandDetector::_get_maybe_landed_state(); @@ -69,9 +69,9 @@ bool VtolLandDetector::_get_maybe_landed_state() bool VtolLandDetector::_get_landed_state() { - // Only trigger in RW mode + // If in Fixed-wing mode, only trigger if disarmed if ((_vehicle_status.timestamp != 0) && _vehicle_status.vehicle_type == vehicle_status_s::VEHICLE_TYPE_FIXED_WING) { - return false; + return !_actuator_armed.armed; } // this is returned from the mutlicopter land detector