diff --git a/Tools/autotest/sim_vehicle.sh b/Tools/autotest/sim_vehicle.sh index b9a7bf153e..a288cf6ca8 100755 --- a/Tools/autotest/sim_vehicle.sh +++ b/Tools/autotest/sim_vehicle.sh @@ -150,7 +150,9 @@ kill_tasks() } } +if [ $START_HIL == 0 ]; then kill_tasks +fi trap kill_tasks SIGINT @@ -364,4 +366,6 @@ if [ $USE_MAVLINK_GIMBAL == 1 ]; then options="$options --load-module=gimbal" fi mavproxy.py $options --cmd="$extra_cmd" $* +if [ $START_HIL == 0 ]; then kill_tasks +fi