ArduPlane: move serial_manager parameters up to base class

This commit is contained in:
Peter Barker 2024-02-28 11:48:25 +11:00 committed by Peter Barker
parent b913ea292b
commit 3085816a16
2 changed files with 11 additions and 4 deletions

View File

@ -29,9 +29,7 @@ const AP_Param::Info Plane::var_info[] = {
// @User: Advanced
GSCALAR(sysid_my_gcs, "SYSID_MYGCS", 255),
// @Group: SERIAL
// @Path: ../libraries/AP_SerialManager/AP_SerialManager.cpp
GOBJECT(serial_manager, "SERIAL", AP_SerialManager),
// AP_SerialManager was here
// @Param: AUTOTUNE_LEVEL
// @DisplayName: Autotune level
@ -1535,4 +1533,13 @@ void Plane::load_parameters(void)
#if HAL_LOGGING_ENABLED
AP_Param::convert_class(g.k_param_logger, &logger, logger.var_info, 0, true);
#endif
static const AP_Param::TopLevelObjectConversion toplevel_conversions[] {
#if AP_SERIALMANAGER_ENABLED
// PARAMETER_CONVERSION - Added: Feb-2024 for Plane-4.6
{ &serial_manager, serial_manager.var_info, Parameters::k_param_serial_manager_old },
#endif
};
AP_Param::convert_toplevel_objects(toplevel_conversions, ARRAY_SIZE(toplevel_conversions));
}

View File

@ -202,7 +202,7 @@ public:
k_param_curr_amp_offset,
k_param_NavEKF, // deprecated - remove
k_param_mission, // mission library
k_param_serial_manager, // serial manager library
k_param_serial_manager_old, // serial manager library
k_param_NavEKF2_old, // deprecated - remove
k_param_land_pre_flare_alt, // unused - moved to AP_Landing
k_param_land_pre_flare_airspeed = 149, // unused - moved to AP_Landing