Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VTOL land detector: trigger land detector in fixed-wing mode if disarmed #12777

Merged
merged 1 commit into from
Sep 10, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/modules/land_detector/VtolLandDetector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,19 +59,19 @@ 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();
}

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
Expand Down