Files
paparazzi/sw/tools/parrot/ardrone2/start_avplay.sh
T
Gautier Hattenberger 9ce18f8146 [vision] add computer vision library in standard modules + 2 modules
- video RTP stream
- image download

for ARDrone2
2014-12-10 11:03:28 +01:00

21 lines
386 B
Bash
Executable File

#!/bin/bash
# base address for ARDrone2
ADDR_BASE=192.168.1.
# test if a complete IP address is passed as first argument or just the last digit
if [ `grep -c '\.' <<< $1` == 1 ]
then
ADDR=$1
PORT=$2
else
ADDR=$ADDR_BASE$1
PORT=$((5000+$1))
fi
pid=0
echo "Start video for $ADDR on port $PORT"
/usr/bin/avplay -loglevel quiet -max_delay 50 -fflags nobuffer rtp://$ADDR:$PORT