jMAVSim: use PX4_SIM_SPEED_FACTOR, not cli arg

In order to be consistent between Gazebo and jMAVSim we should be using
the env variable PX4_SIM_SPEED_FACTOR in the same way. This enables
vscode to set the speed using the env variable.
This commit is contained in:
Julian Oes 2019-06-17 11:42:42 +02:00 committed by Daniel Agar
parent fea284f728
commit e1671571c8
3 changed files with 2 additions and 12 deletions

@ -1 +1 @@
Subproject commit dc10a13c78afeb97f7b570f8049ec8a912e22d81
Subproject commit 883413f8b97cc53d48491d6ff3630d6efd2e2467

View File

@ -33,9 +33,6 @@ while getopts ":b:d:p:qsr:f:i:l" opt; do
r)
extra_args="$extra_args -r $OPTARG"
;;
f)
extra_args="$extra_args -f $OPTARG"
;;
l)
extra_args="$extra_args -lockstep"
;;

View File

@ -63,16 +63,9 @@ 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 $speed_factor -l &
"$src_path"/Tools/jmavsim_run.sh -r 250 -l &
SIM_PID=`echo $!`
elif [ "$program" == "gazebo" ] && [ ! -n "$no_sim" ]; then
if [ -x "$(command -v gazebo)" ]; then