-
Notifications
You must be signed in to change notification settings - Fork 20
/
test_ov8865.sh
executable file
·48 lines (43 loc) · 1.03 KB
/
test_ov8865.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash
w=(3264 3264 1920 1600 1280 800 640)
h=(2448 1836 1080 1200 960 600 480)
function reload() {
echo "Reloading OV8865, wait..."
sleep 1
sudo modprobe -r -v vfe_v4l2
sleep 2
sudo modprobe -r -v ov8858_4lane
sleep 1
sudo modprobe -r -v vm149c_act
sleep 1
sudo modprobe vm149c_act
sleep 1
sudo modprobe ov8858_4lane
sleep 2
sudo modprobe vfe_v4l2
echo "done!"
}
function load() {
echo "Loading OV8865, wait..."
sudo modprobe vm149c_act
sudo modprobe ov8858_4lane
sudo modprobe vfe_v4l2
echo "done!"
}
function unload() {
echo "Unloading OV8865, wait..."
sudo modprobe -r -v vfe_v4l2
sleep 2
sudo modprobe -r -v ov8858_4lane
sleep 1
sudo modprobe -r -v vm149c_act
sleep 1
echo "done!"
}
for index in ${!w[*]}
do
# reload "$1"
echo "TEST OV8865 - $index ( ${w[$index]} x ${h[$index]} )"
# ./cap <width> <height> <buffers [4,8]> <video mode [0,1]> <exposure [-4,4]> <hflip [0,1]> <vflip [0,1]>
./cap "${w[$index]}" "${h[$index]}" "8" "1" "-999" "-1" "-1"
done