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