summaryrefslogtreecommitdiffstats
path: root/tests/grab.sh
blob: daa08c11ae087379a7fd95761627ba82833801e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#! /bin/bash

function pci {
    PCILIB_PATH=".."
    LD_LIBRARY_PATH="$PCILIB_PATH/pcilib" $PCILIB_PATH/pcitool/pci $*
}

rm -f images.raw


echo "Starting the grabber"
pci -g -o images.raw --run-time 3000000 &
pid=$!

usleep 1000000

for i in `seq 1 1000`; do
    echo "Trigger $i"
    pci --trigger
    usleep 100000
done

echo "Waiting grabber to finish"
wait $pid