Files
ardupilot/libraries/AP_Param
Peter BarkerandClaude Opus 5 c12b0653e8 AP_Param: extend conversion tests to convert_class and width conversion
convert_class() copies each scalar across with the same-type copy that
convert_old_parameter() uses, and so has the same requirement that the
copy be sized by the parameter's type; cover it with the same guard-byte
check.

convert_parameter_width() locates the old value by scanning storage for
an entry carrying the old type, so a successful widening needs storage
written by an earlier firmware and cannot be produced in-process.  The
two tests added for it therefore cover only the paths which decline to
convert - no old value in storage, and the parameter already set - and
both of those return before the storage read.  That read is left
uncovered; exercising it would need a way to inject storage in the
older format.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-04 10:15:20 +10:00
..