mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-26 04:03:34 +08:00
VTOL land detector: trigger land detector in fixed-wing mode if disarmed.
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
committed by
Roman Bapst
parent
a8fbe6bba2
commit
1b2403a87f
@@ -59,9 +59,9 @@ void VtolLandDetector::_update_topics()
|
|||||||
|
|
||||||
bool VtolLandDetector::_get_maybe_landed_state()
|
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) {
|
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();
|
return MulticopterLandDetector::_get_maybe_landed_state();
|
||||||
@@ -69,9 +69,9 @@ bool VtolLandDetector::_get_maybe_landed_state()
|
|||||||
|
|
||||||
bool VtolLandDetector::_get_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) {
|
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
|
// this is returned from the mutlicopter land detector
|
||||||
|
|||||||
Reference in New Issue
Block a user