mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-27 18:27:05 +08:00
ROMFS/Tools: switch to TCP connection for SITL
This switches from UDP to TCP to connect to jMAVSim.
This commit is contained in:
@@ -5,7 +5,7 @@ set -e
|
||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
cd "$SCRIPT_DIR/jMAVSim"
|
||||
|
||||
udp_port=14560
|
||||
tcp_port=4560
|
||||
extra_args=
|
||||
baudrate=921600
|
||||
device=
|
||||
@@ -22,7 +22,7 @@ while getopts ":b:d:p:qr:f:i:" opt; do
|
||||
ip="$OPTARG"
|
||||
;;
|
||||
p)
|
||||
udp_port=$OPTARG
|
||||
tcp_port=$OPTARG
|
||||
;;
|
||||
q)
|
||||
extra_args="$extra_args -qgc"
|
||||
@@ -41,7 +41,7 @@ while getopts ":b:d:p:qr:f:i:" opt; do
|
||||
done
|
||||
|
||||
if [ "$device" == "" ]; then
|
||||
device="-udp $ip:$udp_port"
|
||||
device="-tcp $ip:$tcp_port"
|
||||
else
|
||||
device="-serial $device $baudrate"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user