From 69ae0091b8c481fb5441ab19330ff6811d697ce1 Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Tue, 20 Sep 2016 13:21:10 -0400 Subject: [PATCH] VTOL QuadChute only if not landed --- src/modules/vtol_att_control/vtol_type.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/modules/vtol_att_control/vtol_type.cpp b/src/modules/vtol_att_control/vtol_type.cpp index 138fc45637..7fa199a26d 100644 --- a/src/modules/vtol_att_control/vtol_type.cpp +++ b/src/modules/vtol_att_control/vtol_type.cpp @@ -177,6 +177,7 @@ void VtolType::update_fw_state() // only wait on TECS we're in a mode where it is actually running if ((!_tecs_running || (_tecs_running && _fw_virtual_att_sp->timestamp <= _tecs_running_ts)) && _v_control_mode->flag_control_altitude_enabled) { + waiting_on_tecs(); } @@ -195,8 +196,10 @@ bool VtolType::can_transition_on_ground() void VtolType::check_quadchute_condition() { - // fixed-wing minimum altitude - if (_params->fw_min_alt > FLT_EPSILON && _armed->armed) { + // fixed-wing minimum altitude, armed, !landed + if (_params->fw_min_alt > FLT_EPSILON + && _armed->armed && !_land_detected->landed) { + if (-(_local_pos->z) < _params->fw_min_alt) { _attc->abort_front_transition("Minimum altitude"); }