mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-20 20:03:54 +08:00
fix mc_att_control: re-add dropped acro parameters (#8293)
and make sure the vtol params are always initialized
This got lost in 4416c4ddb3
This commit is contained in:
@@ -450,6 +450,8 @@ MulticopterAttitudeControl::MulticopterAttitudeControl() :
|
||||
_params_handles.acro_roll_max = param_find("MC_ACRO_R_MAX");
|
||||
_params_handles.acro_pitch_max = param_find("MC_ACRO_P_MAX");
|
||||
_params_handles.acro_yaw_max = param_find("MC_ACRO_Y_MAX");
|
||||
_params_handles.acro_expo = param_find("MC_ACRO_EXPO");
|
||||
_params_handles.acro_superexpo = param_find("MC_ACRO_SUPEXPO");
|
||||
|
||||
_params_handles.rattitude_thres = param_find("MC_RATT_TH");
|
||||
|
||||
@@ -602,6 +604,10 @@ MulticopterAttitudeControl::parameters_update()
|
||||
_params.vtol_opt_recovery_enabled = (tmp == 1);
|
||||
|
||||
param_get(_params_handles.vtol_wv_yaw_rate_scale, &_params.vtol_wv_yaw_rate_scale);
|
||||
|
||||
} else {
|
||||
_params.vtol_opt_recovery_enabled = false;
|
||||
_params.vtol_wv_yaw_rate_scale = 0.f;
|
||||
}
|
||||
|
||||
param_get(_params_handles.bat_scale_en, &_params.bat_scale_en);
|
||||
|
||||
Reference in New Issue
Block a user