mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-30 21:33:35 +08:00
Minimum altitude for FW flight in standard VTOL
This commit is contained in:
@@ -68,6 +68,7 @@ Standard::Standard(VtolAttitudeControl *attc) :
|
||||
_params_handles_standard.front_trans_time_min = param_find("VT_TRANS_MIN_TM");
|
||||
_params_handles_standard.down_pitch_max = param_find("VT_DWN_PITCH_MAX");
|
||||
_params_handles_standard.forward_thurst_scale = param_find("VT_FWD_THRUST_SC");
|
||||
_params_handles_standard.fw_minimum_altitude = param_find("VT_FW_MIN_ALT");
|
||||
}
|
||||
|
||||
Standard::~Standard()
|
||||
@@ -114,6 +115,9 @@ Standard::parameters_update()
|
||||
/* scale for fixed wing thrust used for forward acceleration in multirotor mode */
|
||||
param_get(_params_handles_standard.forward_thurst_scale, &_params_standard.forward_thurst_scale);
|
||||
|
||||
/* QuadChute; minimum altitude for fixed wing flight */
|
||||
param_get(_params_handles_standard.fw_minimum_altitude, &_params_standard.fw_minimum_altitude);
|
||||
|
||||
|
||||
return OK;
|
||||
}
|
||||
@@ -361,6 +365,10 @@ void Standard::update_fw_state()
|
||||
set_idle_fw(); // force them to stop, not just idle
|
||||
_flag_enable_mc_motors = true;
|
||||
}
|
||||
|
||||
if(_local_pos->dist_bottom < _params_standard.fw_minimum_altitude){
|
||||
_attc->abort_front_transition();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user