vtol_att_control: make sure blending airspeed is smaller than transition airspeed

Signed-off-by: Roman <bapstroman@gmail.com>
This commit is contained in:
Roman
2018-03-07 14:01:51 +01:00
committed by Roman Bapst
parent e0ca38e794
commit 03338935e0
@@ -510,6 +510,9 @@ VtolAttitudeControl::parameters_update()
param_get(_params_handles.front_trans_timeout, &_params.front_trans_timeout);
param_get(_params_handles.mpc_xy_cruise, &_params.mpc_xy_cruise);
// make sure parameters are feasible, require at least 1 m/s difference between transition and blend airspeed
_params.airspeed_blend = math::min(_params.airspeed_blend, _params.transition_airspeed - 1.0f);
// update the parameters of the instances of base VtolType
if (_vtol_type != nullptr) {
_vtol_type->parameters_update();