Proper data manager restart handling

Introduce SYS_RESTART_TYPE parameter having one of 3 values: boot
restart, inflight restart, or unknown restart, and defaulting to unknown
restart.

px4io.cpp sets this parameter according to the type of restart detected.

dataman.c retrieves this parameter and clears data entries according to
their persistence level. Does nothing if unknown restart.
This commit is contained in:
Jean Cyr
2014-04-28 00:52:19 -04:00
parent ad77ba2642
commit ab257ebcce
4 changed files with 64 additions and 18 deletions
+19 -8
View File
@@ -62,12 +62,23 @@ PARAM_DEFINE_INT32(SYS_AUTOSTART, 0);
PARAM_DEFINE_INT32(SYS_AUTOCONFIG, 0);
/**
* Set usage of IO board
*
* Can be used to use a standard startup script but with a FMU only set-up. Set to 0 to force the FMU only set-up.
*
* @min 0
* @max 1
* @group System
*/
* Set usage of IO board
*
* Can be used to use a standard startup script but with a FMU only set-up. Set to 0 to force the FMU only set-up.
*
* @min 0
* @max 1
* @group System
*/
PARAM_DEFINE_INT32(SYS_USE_IO, 1);
/**
* Set restart type
*
* Set by px4io to indicate type of restart
*
* @min 0
* @max 2
* @group System
*/
PARAM_DEFINE_INT32(SYS_RESTART_TYPE, 2);