From 894860880d7b3782c476fb2c1b454206eab4f7c7 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Wed, 28 Feb 2024 15:51:15 +1100 Subject: [PATCH] AntennaTracker: move serial_manager parameters up to base class --- AntennaTracker/Parameters.cpp | 15 +++++++++++---- AntennaTracker/Parameters.h | 5 +---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/AntennaTracker/Parameters.cpp b/AntennaTracker/Parameters.cpp index 5be95dedf7..12b00cb5c8 100644 --- a/AntennaTracker/Parameters.cpp +++ b/AntennaTracker/Parameters.cpp @@ -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| diff --git a/AntennaTracker/Parameters.h b/AntennaTracker/Parameters.h index 1db980b04a..91180fa235 100644 --- a/AntennaTracker/Parameters.h +++ b/AntennaTracker/Parameters.h @@ -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,