From 2f82371d52832a3b2529d60e89fed50421d3c6dd Mon Sep 17 00:00:00 2001 From: Beniamino Pozzan Date: Wed, 2 Jul 2025 23:47:39 +0100 Subject: [PATCH] feat(rcS posix): move param override via env variables later in the startup script this ensures that the overrides are not overridden by other components of the startup script Signed-off-by: Beniamino Pozzan --- ROMFS/px4fmu_common/init.d-posix/rcS | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/ROMFS/px4fmu_common/init.d-posix/rcS b/ROMFS/px4fmu_common/init.d-posix/rcS index bbbc55930c..a0121a9ab1 100644 --- a/ROMFS/px4fmu_common/init.d-posix/rcS +++ b/ROMFS/px4fmu_common/init.d-posix/rcS @@ -126,15 +126,6 @@ then set AUTOCNF yes fi -# Allow overriding parameters via env variables: export PX4_PARAM_{name}={value} -env | while IFS='=' read -r line; do - value=${line#*=} - name=${line%%=*} - case $name in - "PX4_PARAM_"*) param set "${name#PX4_PARAM_}" "$value" ;; - esac -done - # multi-instance setup # shellcheck disable=SC2154 param set MAV_SYS_ID $((px4_instance+1)) @@ -239,6 +230,15 @@ then exit 1 fi +# Allow overriding parameters via env variables: export PX4_PARAM_{name}={value} +env | while IFS='=' read -r line; do + value=${line#*=} + name=${line%%=*} + case $name in + "PX4_PARAM_"*) param set "${name#PX4_PARAM_}" "$value" ;; + esac +done + dataman start # only start the simulator if not in replay mode, as both control the lockstep time