ArduPilot / MissionPlanner

Mission Planner Ground Control Station for ArduPilot (c# .net)
http://ardupilot.org/planner/
GNU General Public License v3.0
1.74k stars 2.36k forks source link

When setting param BLAH_ENABLE (or similar) then refresh params #1321

Open magicrub opened 8 years ago

magicrub commented 8 years ago

When setting many of the XXXXXX_ENABLE params the latest versions of ArduPilot will hide params. For example, if you set ADSB_ENABLE=0 then all other ADSB_xxxxx params disapear. A fetch will only show ADSB_ENABLE=0. When setting ADSB_ENABLE=1 then the autopilot makes the ADSB_xxxx params available but you won't know it until you refresh params.

TODO: When reading all params, make a note of the param count. When writing a param you should check the param response packet and see if the param count value has changed. If so, then a full refresh should be performed.

meee1 commented 8 years ago

@magicrub I like the TODO part, you have confirmed it does respond like this?

magicrub commented 8 years ago

yup. and I just pushed the changes today to make it work for all libraries

meee1 commented 8 years ago

@magicrub :)

magicrub commented 8 years ago

don't forget, that if you write a param that is in a hidden library then it fail. So if you're writing BLAH_PARM1 while BLAH_ENABLE=0 it will fail. So when writing _ENABLE=0 then you have to write those lib's params first, then the ENABLE=0. Opposite goes for _ENABLE=1 you should write enable first then the rest of the params.

This sure made the process more complicated! :(