Copter: convert STB_ params to ATC_ANG_

This commit is contained in:
Randy Mackay 2016-05-28 15:44:27 +09:00
parent 72b86a3f99
commit be3b1cb6ab
1 changed files with 7 additions and 4 deletions

View File

@ -1059,7 +1059,10 @@ void Copter::convert_pid_parameters(void)
{ Parameters::k_param_pid_rate_yaw, 7, AP_PARAM_FLOAT, "ATC_RAT_YAW_ILMI" }, { Parameters::k_param_pid_rate_yaw, 7, AP_PARAM_FLOAT, "ATC_RAT_YAW_ILMI" },
#endif #endif
}; };
AP_Param::ConversionInfo filt_conversion_info[] = { AP_Param::ConversionInfo angle_and_filt_conversion_info[] = {
{ Parameters::k_param_p_stabilize_roll, 0, AP_PARAM_FLOAT, "ATC_ANG_RLL_P" },
{ Parameters::k_param_p_stabilize_pitch, 0, AP_PARAM_FLOAT, "ATC_ANG_PIT_P" },
{ Parameters::k_param_p_stabilize_yaw, 0, AP_PARAM_FLOAT, "ATC_ANG_YAW_P" },
{ Parameters::k_param_pid_rate_roll, 6, AP_PARAM_FLOAT, "ATC_RAT_RLL_FILT" }, { Parameters::k_param_pid_rate_roll, 6, AP_PARAM_FLOAT, "ATC_RAT_RLL_FILT" },
{ Parameters::k_param_pid_rate_pitch, 6, AP_PARAM_FLOAT, "ATC_RAT_PIT_FILT" }, { Parameters::k_param_pid_rate_pitch, 6, AP_PARAM_FLOAT, "ATC_RAT_PIT_FILT" },
{ Parameters::k_param_pid_rate_yaw, 6, AP_PARAM_FLOAT, "ATC_RAT_YAW_FILT" } { Parameters::k_param_pid_rate_yaw, 6, AP_PARAM_FLOAT, "ATC_RAT_YAW_FILT" }
@ -1086,9 +1089,9 @@ void Copter::convert_pid_parameters(void)
for (uint8_t i=0; i<table_size; i++) { for (uint8_t i=0; i<table_size; i++) {
AP_Param::convert_old_parameter(&imax_conversion_info[i], 1.0f/4500.0f); AP_Param::convert_old_parameter(&imax_conversion_info[i], 1.0f/4500.0f);
} }
// convert filter without scaling // convert angle controller gain and filter without scaling
table_size = ARRAY_SIZE(filt_conversion_info); table_size = ARRAY_SIZE(angle_and_filt_conversion_info);
for (uint8_t i=0; i<table_size; i++) { for (uint8_t i=0; i<table_size; i++) {
AP_Param::convert_old_parameter(&filt_conversion_info[i], 1.0f); AP_Param::convert_old_parameter(&angle_and_filt_conversion_info[i], 1.0f);
} }
} }