mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
Tools: add PX4_SIM_SPEED_FACTOR as env variable
This adds the env variable PX4_SIM_SPEED_FACTOR to set the speed factor to run SITL at.
This commit is contained in:
parent
107606e757
commit
23acb77e2d
@ -66,10 +66,18 @@ done
|
||||
|
||||
SIM_PID=0
|
||||
|
||||
# Allow speed factor to bet set from environment.
|
||||
if [[ -n "$PX4_SIM_SPEED_FACTOR" ]];
|
||||
then
|
||||
speed_factor=$PX4_SIM_SPEED_FACTOR
|
||||
else
|
||||
speed_factor=1
|
||||
fi
|
||||
|
||||
if [ "$program" == "jmavsim" ] && [ ! -n "$no_sim" ]
|
||||
then
|
||||
# Start Java simulator
|
||||
"$src_path"/Tools/jmavsim_run.sh -r 250 -f 1 &
|
||||
"$src_path"/Tools/jmavsim_run.sh -r 250 -f $speed_factor &
|
||||
SIM_PID=`echo $!`
|
||||
elif [ "$program" == "gazebo" ] && [ ! -n "$no_sim" ]
|
||||
then
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user