AntennaTracker: move serial_manager parameters up to base class

This commit is contained in:
Peter Barker 2024-02-28 15:51:15 +11:00 committed by Peter Barker
parent 4027b32b07
commit 894860880d
2 changed files with 12 additions and 8 deletions

View File

@ -308,10 +308,8 @@ const AP_Param::Info Tracker::var_info[] = {
// @Group: SERVO
// @Path: ../libraries/SRV_Channel/SRV_Channels.cpp
GOBJECT(servo_channels, "SERVO", SRV_Channels),
// @Group: SERIAL
// @Path: ../libraries/AP_SerialManager/AP_SerialManager.cpp
GOBJECT(serial_manager, "SERIAL", AP_SerialManager),
// AP_SerialManager was here
// @Param: PITCH2SRV_P
// @DisplayName: Pitch axis controller P gain
@ -601,6 +599,15 @@ void Tracker::load_parameters(void)
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 Tracker-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));
#if HAL_HAVE_SAFETY_SWITCH
// configure safety switch to allow stopping the motors while armed
AP_Param::set_default_by_name("BRD_SAFETYOPTION", AP_BoardConfig::BOARD_SAFETY_OPTION_BUTTON_ACTIVE_SAFETY_OFF|

View File

@ -91,10 +91,7 @@ public:
k_param_can_mgr,
k_param_battery,
//
// 150: Telemetry control
//
k_param_serial_manager, // serial manager library
k_param_serial_manager_old = 144, // serial manager library
k_param_servo_yaw_type,
k_param_alt_source,
k_param_mavlink_update_rate,