From 4c96ec26e55dc3b5048ce14c802f3e3729ba40b0 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 21 May 2015 21:16:32 +1000 Subject: [PATCH] autotest: fixed the -e option for sim_vehicle.sh --- Tools/autotest/sim_vehicle.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Tools/autotest/sim_vehicle.sh b/Tools/autotest/sim_vehicle.sh index d1d56e674b..bb651b5d1d 100755 --- a/Tools/autotest/sim_vehicle.sh +++ b/Tools/autotest/sim_vehicle.sh @@ -339,9 +339,11 @@ EOF PARMS="ArduPlane.parm" if [ "$FRAME" = "CRRCSim" ]; then RUNSIM="nice $autotest/pysim/sim_wrapper.py --frame=CRRCSim --home=$SIMHOME --simin=$SIMIN_PORT --simout=$SIMOUT_PORT --fgout=$FG_PORT $EXTRA_SIM" - else + elif [ $EXTERNAL_SIM == 0 ]; then RUNSIM="" cmd="$cmd --model jsbsim --speedup=$SPEEDUP" + else + echo "Using external plane simulator" fi ;; ArduCopter) @@ -378,7 +380,9 @@ fi trap kill_tasks SIGINT -if test -n "$RUNSIM"; then +echo "RUNSIM: $RUNSIM" + +if [ -n "$RUNSIM" -o "$EXTERNAL_SIM" == 1 ]; then sleep 2 rm -f $tfile if [ $EXTERNAL_SIM == 0 ]; then @@ -396,6 +400,8 @@ if test -n "$RUNSIM"; then } sleep 2 fi +else + echo "not running external simulator" fi # mavproxy.py --master tcp:127.0.0.1:5760 --sitl 127.0.0.1:5501 --out 127.0.0.1:14550 --out 127.0.0.1:14551