mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-04 05:05:19 +08:00
chore(rCS posix): move param override through env var after airframe selection (#26193)
Signed-off-by: Beniamino Pozzan <beniamino.pozzan@gmail.com>
This commit is contained in:
@@ -126,15 +126,6 @@ then
|
|||||||
set AUTOCNF yes
|
set AUTOCNF yes
|
||||||
fi
|
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
|
# multi-instance setup
|
||||||
# shellcheck disable=SC2154
|
# shellcheck disable=SC2154
|
||||||
param set MAV_SYS_ID $((px4_instance+1))
|
param set MAV_SYS_ID $((px4_instance+1))
|
||||||
@@ -238,6 +229,15 @@ then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
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
|
dataman start
|
||||||
|
|
||||||
# only start the simulator if not in replay mode, as both control the lockstep time
|
# only start the simulator if not in replay mode, as both control the lockstep time
|
||||||
|
|||||||
Reference in New Issue
Block a user