jmavsim_run.sh: add -i to specify the IP

This commit is contained in:
Beat Küng 2017-03-09 11:12:48 +01:00 committed by Lorenz Meier
parent 62200e2a81
commit 541e53fdcf
1 changed files with 6 additions and 2 deletions

View File

@ -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