mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
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:
parent
fea284f728
commit
e1671571c8
@ -1 +1 @@
|
||||
Subproject commit dc10a13c78afeb97f7b570f8049ec8a912e22d81
|
||||
Subproject commit 883413f8b97cc53d48491d6ff3630d6efd2e2467
|
||||
@ -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"
|
||||
;;
|
||||
|
||||
@ -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…
x
Reference in New Issue
Block a user