Browse Source

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.
sbg
Julian Oes 6 years ago committed by Daniel Agar
parent
commit
e1671571c8
  1. 2
      Tools/jMAVSim
  2. 3
      Tools/jmavsim_run.sh
  3. 9
      Tools/sitl_run.sh

2
Tools/jMAVSim

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

3
Tools/jmavsim_run.sh

@ -33,9 +33,6 @@ while getopts ":b:d:p:qsr:f:i:l" opt; do @@ -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"
;;

9
Tools/sitl_run.sh

@ -63,16 +63,9 @@ done @@ -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

Loading…
Cancel
Save