Converted the old battery failsafe parameters (Mar-2018) and
COMPASS_ENABLE (Apr-2019). Sub has no 4.2, 4.3, 4.4 or 4.6 release, so
the oldest version a user can be moving from once the migration floor is
4.3 is ArduSub-4.5.0, which has already had these applied.
This moved ATC_RAT_RLL/PIT/YAW_FILT to ATC_RAT_*_FLTE and dates from
2019 - it is present in ArduSub-4.1.2 and ArduSub-4.5.0. Sub has no
4.2, 4.3, 4.4 or 4.6 release, so the oldest version a user can be moving
from once the migration floor is 4.3 is ArduSub-4.5.0, which has already
had this applied.
Sub::convert_old_parameters() is left empty by this, so it goes too.
Sub has no 4.2, 4.3, 4.4 or 4.6 release, so the oldest version a user
can be moving from once the migration floor is 4.3 is Sub-4.5. Both of
these conversions are present in ArduSub-4.5.0, so anybody running that
or later has already had them applied:
- the airspeed object out of g2 (Jan-2022)
- FENCE_ parameters into the AC_Fence object (Mar-2022)
Also drops the call to SRV_Channels::upgrade_parameters(), which is
being removed.
Adds the missing PARAMETER_CONVERSION annotation to the conversion_table
(battery failsafe parameters, Mar-2018, and COMPASS_ENABLE, Apr-2019)
and to the attitude control _FILT to FLTE conversion (Jul-2019).
Remaining changes are date format corrections. No functional change.
Also annotates the ARMDISARM_UNUSED to ARMDISARM rewrite of stored
RCn_OPTION values, which calls set_and_save() directly rather than going
through an AP_Param::convert_* helper and so was missed by an audit
anchored on those helpers. It went in during Sep-2021, but Sub has no
4.2 to 4.4 releases, so established by content it first shipped in
ArduSub-4.5.0.
This removes the need for the pointer to the first flight mode, and
removes the undefined behavior resulting from indexing past that first
flight mode and hoping the others follow (though this is unlikely to
pose a problem in practice).
Saves a few bytes of RAM and flash as the pointer is no longer needed
and code is no longer necessary to set it up.
Also fixes the bounds check condition of that array to match its size so
there is no longer the possibility of indexing one past it.