mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
jmavsim_run.sh: add -i to specify the IP
This commit is contained in:
parent
62200e2a81
commit
541e53fdcf
@ -7,7 +7,8 @@ udp_port=14560
|
||||
extra_args=
|
||||
baudrate=921600
|
||||
device=
|
||||
while getopts ":b:d:p:qr:" opt; do
|
||||
ip="127.0.0.1"
|
||||
while getopts ":b:d:p:qr:i:" opt; do
|
||||
case $opt in
|
||||
b)
|
||||
baudrate=$OPTARG
|
||||
@ -15,6 +16,9 @@ while getopts ":b:d:p:qr:" opt; do
|
||||
d)
|
||||
device="$OPTARG"
|
||||
;;
|
||||
i)
|
||||
ip="$OPTARG"
|
||||
;;
|
||||
p)
|
||||
udp_port=$OPTARG
|
||||
;;
|
||||
@ -32,7 +36,7 @@ while getopts ":b:d:p:qr:" opt; do
|
||||
done
|
||||
|
||||
if [ "$device" == "" ]; then
|
||||
device="-udp 127.0.0.1:$udp_port"
|
||||
device="-udp $ip:$udp_port"
|
||||
else
|
||||
device="-serial $device $baudrate"
|
||||
fi
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user