/alps/ipecamera

To get this branch, use:
bzr branch http://suren.me/webbzr/alps/ipecamera
245 by Suren A. Chilingaryan
First stand-alone ipecamera implementation
1
#! /bin/bash
2
271 by Suren A. Chilingaryan
Improve autotrigger test
3
#Example options:
4
# ./autotrigger.sh --threads 4 							- use multiple threads for preprocessing
5
# ./autotrigger.sh --data raw --format raw					- test raw_data_callback functionality
6
# PCILIB_DEBUG_MISSING_EVENTS=1 IPECAMERA_DEBUG_HARDWARE=1 ./autotrigger.sh	- debug missing frames 
7
245 by Suren A. Chilingaryan
First stand-alone ipecamera implementation
8
function pci {
246 by Suren A. Chilingaryan
Link against ufodecode
9
    APP_PATH=`dirname $0`/..
10
    if [ -d $APP_PATH/../pcitool ]; then
11
        PCILIB_BINARY="$APP_PATH/../pcitool/pcitool/pci"
12
        PCILIB_PATH="$APP_PATH/../pcitool/pcilib"
13
    else
14
	PCILIB_BINARY=`which pci`
15
	PCILIB_PATH=""
16
    fi
17
    
18
    LD_LIBRARY_PATH="$PCILIB_PATH" PCILIB_PLUGIN_DIR="$APP_PATH" $PCILIB_BINARY $*
245 by Suren A. Chilingaryan
First stand-alone ipecamera implementation
19
}
20
21
echo "Starting the grabber"
271 by Suren A. Chilingaryan
Improve autotrigger test
22
pci -g -o /dev/null --run-time 10002000000 --verbose 10 $@ &
245 by Suren A. Chilingaryan
First stand-alone ipecamera implementation
23
pid=$!
24
271 by Suren A. Chilingaryan
Improve autotrigger test
25
trap "{ kill -s INT $!; }" SIGINT
266 by Suren A. Chilingaryan
Properly stop on SIGINT in autotrigger test
26
261 by Suren A. Chilingaryan
Support for new CMOSIS 20MPix camera
27
sleep 0.1
245 by Suren A. Chilingaryan
First stand-alone ipecamera implementation
28
pci -w 9040 80004a01
271 by Suren A. Chilingaryan
Improve autotrigger test
29
sleep 10000
245 by Suren A. Chilingaryan
First stand-alone ipecamera implementation
30
pci -w 9040 80000201
31
32
echo "Waiting grabber to finish"
33
wait $pid