diff options
author | Jean Cyr <jcyr@dillobits.com> | 2014-04-28 00:52:19 -0400 |
---|---|---|
committer | Jean Cyr <jcyr@dillobits.com> | 2014-04-28 00:52:19 -0400 |
commit | ab257ebcced2af6ddb528a9d48355dc2cac7d10a (patch) | |
tree | 550b07e41052cccced28aafa439bcda264fa952b /src/modules/systemlib | |
parent | ad77ba26427aa9a2d8b8241fc95271667a1c0863 (diff) | |
download | px4-firmware-ab257ebcced2af6ddb528a9d48355dc2cac7d10a.tar.gz px4-firmware-ab257ebcced2af6ddb528a9d48355dc2cac7d10a.tar.bz2 px4-firmware-ab257ebcced2af6ddb528a9d48355dc2cac7d10a.zip |
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.
Diffstat (limited to 'src/modules/systemlib')
-rw-r--r-- | src/modules/systemlib/system_params.c | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/src/modules/systemlib/system_params.c b/src/modules/systemlib/system_params.c index ec2bc3a9a..702e435ac 100644 --- a/src/modules/systemlib/system_params.c +++ b/src/modules/systemlib/system_params.c @@ -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); |