diff --git a/src/modules/vtol_att_control/vtol_att_control_params.c b/src/modules/vtol_att_control/vtol_att_control_params.c index 393265cfd9..80662e708f 100644 --- a/src/modules/vtol_att_control/vtol_att_control_params.c +++ b/src/modules/vtol_att_control/vtol_att_control_params.c @@ -255,13 +255,14 @@ PARAM_DEFINE_INT32(VT_FW_QC_R, 0); * Triggering a quadchute always means transitioning the vehicle to hover flight in which generally a lot of energy is consumed. * At high altitudes there is therefore a big risk to deplete the battery and therefore crash. Currently, there is no automated * re-transition to fixed wing mode implemented and therefore this parameter serves and an intermediate measure to increase safety. + * Setting this value to 0 deactivates the behavior. * * @unit m + * @min 0 * @increment 1 - * @decimal 1 * @group VTOL Attitude Control */ -PARAM_DEFINE_FLOAT(VT_FW_QC_HMAX, 200.0f); +PARAM_DEFINE_INT32(VT_FW_QC_HMAX, 0); /** * Airspeed less front transition time (open loop) diff --git a/src/modules/vtol_att_control/vtol_type.cpp b/src/modules/vtol_att_control/vtol_type.cpp index a48050eb36..4a64ad9203 100644 --- a/src/modules/vtol_att_control/vtol_type.cpp +++ b/src/modules/vtol_att_control/vtol_type.cpp @@ -228,7 +228,9 @@ bool VtolType::isQuadchuteEnabled() } - return _v_control_mode->flag_armed && !_land_detected->landed && dist_to_ground < _param_quadchute_max_height.get(); + return _v_control_mode->flag_armed && + !_land_detected->landed && _param_quadchute_max_height.get() > 0 && + dist_to_ground < (float)_param_quadchute_max_height.get(); } bool VtolType::isMinAltBreached() diff --git a/src/modules/vtol_att_control/vtol_type.h b/src/modules/vtol_att_control/vtol_type.h index 8b520f753b..44017146ef 100644 --- a/src/modules/vtol_att_control/vtol_type.h +++ b/src/modules/vtol_att_control/vtol_type.h @@ -314,7 +314,7 @@ protected: (ParamFloat) _param_vt_fw_alt_err, (ParamInt) _param_vt_fw_qc_p, (ParamInt) _param_vt_fw_qc_r, - (ParamFloat) _param_quadchute_max_height, + (ParamInt) _param_quadchute_max_height, (ParamFloat) _param_vt_f_tr_ol_tm, (ParamFloat) _param_vt_trans_min_tm,