Skip to content

Commit

Permalink
Plane:remove stale conversion code
Browse files Browse the repository at this point in the history
these lines are all present in 4.0.0.

Past this PR we won't convert PIDS correctly if someone attempts to upgrade to 4.7+ from 3.x
  • Loading branch information
peterbarker committed Jan 8, 2025
1 parent 20c77ae commit 2bcfd76
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 65 deletions.
43 changes: 0 additions & 43 deletions ArduPlane/Parameters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1339,49 +1339,6 @@ ParametersG2::ParametersG2(void) :
old object. This should be zero for top level parameters.
*/
static const AP_Param::ConversionInfo conversion_table[] = {
{ Parameters::k_param_log_bitmask_old, 0, AP_PARAM_INT16, "LOG_BITMASK" },
{ Parameters::k_param_rally_limit_km_old, 0, AP_PARAM_FLOAT, "RALLY_LIMIT_KM" },
{ Parameters::k_param_rally_total_old, 0, AP_PARAM_INT8, "RALLY_TOTAL" },
{ Parameters::k_param_serial0_baud, 0, AP_PARAM_INT16, "SERIAL0_BAUD" },
{ Parameters::k_param_serial1_baud, 0, AP_PARAM_INT16, "SERIAL1_BAUD" },
{ Parameters::k_param_serial2_baud, 0, AP_PARAM_INT16, "SERIAL2_BAUD" },

// these are needed to cope with the change to treat nested index 0 as index 63
{ Parameters::k_param_quadplane, 3, AP_PARAM_FLOAT, "Q_RT_RLL_P" },
{ Parameters::k_param_quadplane, 4, AP_PARAM_FLOAT, "Q_RT_PIT_P" },
{ Parameters::k_param_quadplane, 5, AP_PARAM_FLOAT, "Q_RT_YAW_P" },

{ Parameters::k_param_quadplane, 6, AP_PARAM_FLOAT, "Q_STB_R_P" },
{ Parameters::k_param_quadplane, 7, AP_PARAM_FLOAT, "Q_STB_P_P" },
{ Parameters::k_param_quadplane, 8, AP_PARAM_FLOAT, "Q_STB_Y_P" },

{ Parameters::k_param_quadplane, 12, AP_PARAM_FLOAT, "Q_PZ_P" },
{ Parameters::k_param_quadplane, 13, AP_PARAM_FLOAT, "Q_PXY_P" },
{ Parameters::k_param_quadplane, 14, AP_PARAM_FLOAT, "Q_VXY_P" },
{ Parameters::k_param_quadplane, 15, AP_PARAM_FLOAT, "Q_VZ_P" },
{ Parameters::k_param_quadplane, 16, AP_PARAM_FLOAT, "Q_AZ_P" },

{ Parameters::k_param_land_slope_recalc_shallow_threshold,0,AP_PARAM_FLOAT, "LAND_SLOPE_RCALC" },
{ Parameters::k_param_land_slope_recalc_steep_threshold_to_abort,0,AP_PARAM_FLOAT, "LAND_ABORT_DEG" },
{ Parameters::k_param_land_flare_alt, 0, AP_PARAM_FLOAT, "LAND_FLARE_ALT" },
{ Parameters::k_param_land_flare_sec, 0, AP_PARAM_FLOAT, "LAND_FLARE_SEC" },
{ Parameters::k_param_land_pre_flare_sec, 0, AP_PARAM_FLOAT, "LAND_PF_SEC" },
{ Parameters::k_param_land_pre_flare_alt, 0, AP_PARAM_FLOAT, "LAND_PF_ALT" },
{ Parameters::k_param_land_pre_flare_airspeed, 0, AP_PARAM_FLOAT, "LAND_PF_ARSPD" },
{ Parameters::k_param_land_throttle_slewrate, 0, AP_PARAM_INT8, "LAND_THR_SLEW" },
{ Parameters::k_param_land_disarm_delay, 0, AP_PARAM_INT8, "LAND_DISARMDELAY" },
{ Parameters::k_param_land_then_servos_neutral,0, AP_PARAM_INT8, "LAND_THEN_NEUTRAL" },
{ Parameters::k_param_land_abort_throttle_enable,0,AP_PARAM_INT8, "LAND_ABORT_THR" },
{ Parameters::k_param_land_flap_percent, 0, AP_PARAM_INT8, "LAND_FLAP_PERCENT" },

// battery failsafes
{ Parameters::k_param_fs_batt_voltage, 0, AP_PARAM_FLOAT, "BATT_LOW_VOLT" },
{ Parameters::k_param_fs_batt_mah, 0, AP_PARAM_FLOAT, "BATT_LOW_MAH" },

{ Parameters::k_param_arming, 3, AP_PARAM_INT8, "ARMING_RUDDER" },
{ Parameters::k_param_compass_enabled_deprecated, 0, AP_PARAM_INT8, "COMPASS_ENABLE" },
{ Parameters::k_param_arming, 128, AP_PARAM_INT16, "ARMING_CHECK" },

{ Parameters::k_param_fence_minalt, 0, AP_PARAM_INT16, "FENCE_ALT_MIN"},
{ Parameters::k_param_fence_maxalt, 0, AP_PARAM_INT16, "FENCE_ALT_MAX"},
{ Parameters::k_param_fence_retalt, 0, AP_PARAM_INT16, "FENCE_RET_ALT"},
Expand Down
22 changes: 0 additions & 22 deletions ArduPlane/quadplane.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -585,29 +585,7 @@ static const struct AP_Param::defaults_table_struct defaults_table[] = {
conversion table for quadplane parameters
*/
const AP_Param::ConversionInfo q_conversion_table[] = {
{ Parameters::k_param_quadplane, 4044, AP_PARAM_FLOAT, "Q_P_POSZ_P" }, // Q_PZ_P
{ Parameters::k_param_quadplane, 4045, AP_PARAM_FLOAT, "Q_P_POSXY_P"}, // Q_PXY_P
{ Parameters::k_param_quadplane, 4046, AP_PARAM_FLOAT, "Q_P_VELXY_P"}, // Q_VXY_P
{ Parameters::k_param_quadplane, 78, AP_PARAM_FLOAT, "Q_P_VELXY_I"}, // Q_VXY_I
{ Parameters::k_param_quadplane, 142, AP_PARAM_FLOAT, "Q_P_VELXY_IMAX"}, // Q_VXY_IMAX
{ Parameters::k_param_quadplane, 206, AP_PARAM_FLOAT, "Q_P_VELXY_FLTE"}, // Q_VXY_FILT_HZ
{ Parameters::k_param_quadplane, 4047, AP_PARAM_FLOAT, "Q_P_VELZ_P"}, // Q_VZ_P
{ Parameters::k_param_quadplane, 4048, AP_PARAM_FLOAT, "Q_P_ACCZ_P"}, // Q_AZ_P
{ Parameters::k_param_quadplane, 80, AP_PARAM_FLOAT, "Q_P_ACCZ_I"}, // Q_AZ_I
{ Parameters::k_param_quadplane, 144, AP_PARAM_FLOAT, "Q_P_ACCZ_D"}, // Q_AZ_D
{ Parameters::k_param_quadplane, 336, AP_PARAM_FLOAT, "Q_P_ACCZ_IMAX"}, // Q_AZ_IMAX
{ Parameters::k_param_quadplane, 400, AP_PARAM_FLOAT, "Q_P_ACCZ_FLTD"}, // Q_AZ_FILT
{ Parameters::k_param_quadplane, 464, AP_PARAM_FLOAT, "Q_P_ACCZ_FF"}, // Q_AZ_FF
{ Parameters::k_param_quadplane, 276, AP_PARAM_FLOAT, "Q_LOIT_SPEED"}, // Q_WP_LOIT_SPEED
{ Parameters::k_param_quadplane, 468, AP_PARAM_FLOAT, "Q_LOIT_BRK_JERK" },// Q_WP_LOIT_JERK
{ Parameters::k_param_quadplane, 532, AP_PARAM_FLOAT, "Q_LOIT_ACC_MAX" }, // Q_WP_LOIT_MAXA
{ Parameters::k_param_quadplane, 596, AP_PARAM_FLOAT, "Q_LOIT_BRK_ACCEL" },// Q_WP_LOIT_MINA
{ Parameters::k_param_q_attitude_control, 385, AP_PARAM_FLOAT, "Q_A_RAT_RLL_FLTD" },// Q_A_RAT_RLL_FILT
{ Parameters::k_param_q_attitude_control, 386, AP_PARAM_FLOAT, "Q_A_RAT_PIT_FLTD" },// Q_A_RAT_PIT_FILT
{ Parameters::k_param_q_attitude_control, 387, AP_PARAM_FLOAT, "Q_A_RAT_YAW_FLTE" },// Q_A_RAT_YAW_FILT
{ Parameters::k_param_q_attitude_control, 449, AP_PARAM_FLOAT, "Q_A_RAT_RLL_FF" }, // Q_A_RAT_RLL_FF
{ Parameters::k_param_q_attitude_control, 450, AP_PARAM_FLOAT, "Q_A_RAT_PIT_FF" }, // Q_A_RAT_PIT_FF
{ Parameters::k_param_q_attitude_control, 451, AP_PARAM_FLOAT, "Q_A_RAT_YAW_FF" }, // Q_A_RAT_YAW_FILT

// tailsitter params have moved but retain the same names
{ Parameters::k_param_quadplane, 48, AP_PARAM_INT8, "Q_TAILSIT_ANGLE" },
Expand Down

0 comments on commit 2bcfd76

Please sign in to comment.