Hi Michael,
Thanks very much for the testing! Much appreciated.
I have had a look at your pull request (which includes both Andrews
library and your changes). I have only noticed two issues:
1) it doesn't look like the two entries needed in conversion_table[] in
ArduPlane/Parameters.pde have been added.
The conversion_table[] is what allows parameters to change name or
move into a library without losing their existing value. So if
someone had a set rally points loaded and/or had a RALLY_LIMIT_KM
value set then it looks to me as though those would not be preserved
on upgrade.
2) The second (and much more serious) problem is the removal of the
k_param_rally_limit_km enum from Parameters.h. That will change the
numbering of the 9 subsequent parameters in that group, which means
those 9 parameters will become corrupt when users upgrade. When
changing Parameters.h you need to be very careful to preserve
numbering.
The usual method is to rename the old enum to a _old, so
k_param_rally_limit_km becomes k_param_rally_limit_km_old. You then
use the k_param_rally_limit_km_old value in the conversion_table[] so
the AP_Param code can auto-upgrade variables when the user updates
firmware.
I haven't actually tried the AP_Rally code in SITL, I just based the
above on a quick look with gitk.
> All my SITL and bench tests checkout. AP_Rally _can_ load Rally
> Points created with the previous implementation, which I think was one
> of Tridge's concerns. I think AP_Rally is ready to be merged into
> master.
What I was concerned about was not just that rally points can be loaded,
but that they are preserved on upgrade. So users should be able to
upgrade to the new firmware without having to reload their
parameters. That is particularly important for a safety critical
parameter like rally points.
One trick to testing this is to take a copy of eeprom.bin and restore it
when testing so you can wind back to an old version.
Note that you will almost certainly have a corrupt eeprom.bin in SITL
now, due to the enum bug above. You will need to remove it and
reconfigure (see the -w option to sim_vehicle.sh).
Cheers, Tridge