ArduCopter: move serial_manager parameters up to base class

This commit is contained in:
Peter Barker 2024-02-28 10:03:43 +11:00 committed by Peter Barker
parent 32abb5b0ad
commit b913ea292b
2 changed files with 12 additions and 4 deletions

View File

@ -78,9 +78,7 @@ const AP_Param::Info Copter::var_info[] = {
// @Bitmask: 0:Feedback from mid stick,1:High throttle cancels landing,2:Disarm on land detection
GSCALAR(throttle_behavior, "PILOT_THR_BHV", 0),
// @Group: SERIAL
// @Path: ../libraries/AP_SerialManager/AP_SerialManager.cpp
GOBJECT(serial_manager, "SERIAL", AP_SerialManager),
// AP_SerialManager was here
// @Param: TELEM_DELAY
// @DisplayName: Telemetry startup delay
@ -1379,6 +1377,16 @@ void Copter::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 Copter-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));
// setup AP_Param frame type flags
AP_Param::set_frame_type_flags(AP_PARAM_FRAME_COPTER);
}

View File

@ -214,7 +214,7 @@ public:
k_param_gcs2,
k_param_serial2_baud_old, // deprecated
k_param_serial2_protocol, // deprecated
k_param_serial_manager,
k_param_serial_manager_old,
k_param_ch9_option_old,
k_param_ch10_option_old,
k_param_ch11_option_old,