From 1bc0b2acf69704c8b259f3bc7b6f72f6bf223590 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Thu, 27 Aug 2026 13:49:47 +1000 Subject: [PATCH] ArduPlane: annotate and correct parameter conversion comments Adds the missing PARAMETER_CONVERSION annotation to: - the conversion_table, which converts the old altitude fence parameters (Mar-2021) - the loop converting the old chan params to RCx_OPTION (Mar-2021) - the tailsitter (Jul-2021) and tiltrotor (Sep-2021) blocks of q_conversion_table The quadplane centi-conversions already carried a date in prose ("centi-conversions added January 2024"); that is now in the standard form. Remaining changes are date format corrections. No functional change. Also replaces the "CONVERSION: Added for upgrade to ArduPlane 4.2, Sep 2021" comment on the RCn_OPTION conversion with the standard annotation. That conversion calls set_and_save() directly rather than an AP_Param::convert_* helper, so an audit anchored on those helpers did not see it. Established by content: absent from Plane-4.1.7, present in Plane-4.2.0. --- ArduPlane/Parameters.cpp | 8 +++++--- ArduPlane/quadplane.cpp | 8 +++++--- ArduPlane/system.cpp | 2 +- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/ArduPlane/Parameters.cpp b/ArduPlane/Parameters.cpp index a25a41a6deb..30533c4f505 100644 --- a/ArduPlane/Parameters.cpp +++ b/ArduPlane/Parameters.cpp @@ -1319,6 +1319,7 @@ ParametersG2::ParametersG2(void) : old object. This should be zero for top level parameters. */ static const AP_Param::ConversionInfo conversion_table[] = { + // PARAMETER_CONVERSION - Added: Mar-2021 for ArduPlane-4.1 { 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"}, @@ -1372,6 +1373,7 @@ void Plane::load_parameters(void) AP_Param::set_frame_type_flags(AP_PARAM_FRAME_PLANE); // Convert chan params to RCx_OPTION + // PARAMETER_CONVERSION - Added: Mar-2021 for ArduPlane-4.1 for (uint8_t i=0; i