paparazzi/paparazzi — pull request #832 by gtoonstra (2014-09-15 01:53:41+00:00)
Title: Telemetry store settings

This is a pull request for the ability to store parameters in flash, so that after a reboot these parameters can be read in the initialization stage of the settings.
Overview:
- persistent_settings.xml is a file that adds a persistence tab to the gcs so the store function can be triggered.
- settings.c added a check that the store function cannot be triggered in flight. The regular parameter updates however will still continue to work, so one can update the parameters as usual, they just won't be saved until the user lands the aircraft and then clicks store.
- the airframe shows how persistent storage functions are actually added to the code. Without the USE_PERSISTENT_SETTINGS define, the storage functions won't be added to the compilation stage.
- a minor update to the radio file, which uses always 8 channels and not 7.
- added the jsbsim xml file for the simulator.
- added a script to start flightgear with a mikrokopter.

Without any "persistent=true" attributes in any settings file, the persistent storage structure remains empty and the result of writing will be 0 (also in the UI). So, the next question is which parameters in the config files will need to be made persistent. Instead of going ahead and proposing the changes in a couple of changed files, I will open this topic on the mailing list on how to approach this subject.

Testing:
- I added persistent=true to one file temporarily, recompiled and reloaded the code. Then I verified the function gets called and the flash memory is updated.
- I then stopped all processes, reflashed and rebooted the boards and restarted all processes.
- Then I went into the GCS, noticed the default value A for the specific parameter, modified that to value B, clicked the tick mark to upload this value, then clicked the Store function, remembering the value B.
- I verified the "store" button changed from 0. to "Store" (which means the store was successful).
- Then I killed all processes, removed power from the boards and restarted everything.
- I waited for the server process to accumulate the new settings (these get sent by telemetry in an iterative process).
- Then I went into settings and verified the value of that specific parameter, which appeared as value B.

Associated with issue #29