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:
Julian Oes 2018-11-13 15:24:39 +01:00
parent 107606e757
commit 23acb77e2d

View File

@ -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