From 053ede6ca5038debc2a6b3d9547dae7fa45a09cb Mon Sep 17 00:00:00 2001 From: Julien Lecoeur Date: Tue, 19 Nov 2019 12:11:33 +0100 Subject: [PATCH] SITL: create a parameter file for each airframe --- ROMFS/px4fmu_common/init.d-posix/rcS | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/ROMFS/px4fmu_common/init.d-posix/rcS b/ROMFS/px4fmu_common/init.d-posix/rcS index 043b9397cc..7096a98b90 100644 --- a/ROMFS/px4fmu_common/init.d-posix/rcS +++ b/ROMFS/px4fmu_common/init.d-posix/rcS @@ -55,9 +55,21 @@ fi uorb start -if [ -f eeprom/parameters ] + +# Load parameters +set PARAM_FILE eeprom/parameters_"$REQUESTED_AUTOSTART" +param select $PARAM_FILE + +if [ -f $PARAM_FILE ] then - param load + if param load + then + echo "[param] Loaded: $PARAM_FILE" + else + echo "[param] FAILED loading $PARAM_FILE" + fi +else + echo "[param] parameter file not found, creating $PARAM_FILE" fi # exit early when the minimal shell is requested