-
Notifications
You must be signed in to change notification settings - Fork 0
/
vision.conf
31 lines (26 loc) · 1.27 KB
/
vision.conf
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
# FRC vision detection program.
#
# To watch the log, run the command:
# tail -f /var/www/html/vision/vision.log
#
# Put this file in the directory /etc/init
# To start run:
# sudo service vision start
# To restart (say after a script change):
# sudo service vision restart
#
description "FRC vision detection program"
#start on runlevel [2]
start on filesystem
#stop on runlevel [!2]
#expect fork
respawn
script
echo starting vision >> /var/www/html/vision/vision.log
sleep 10
v4l2-ctl -d /dev/video0 -c brightness=80 -c contrast=0 -c saturation=200 -c white_balance_temperature_auto=0 -c power_line_frequency=2 -c white_balance_temperature=10000 -c sharpness=0 -c exposure_auto=1 -c exposure_absolute=5 -c tilt_absolute=0 -c zoom_absolute=0 || true
v4l2-ctl -d /dev/video1 -c brightness=80 -c contrast=0 -c saturation=200 -c white_balance_temperature_auto=0 -c power_line_frequency=2 -c white_balance_temperature=10000 -c sharpness=0 -c exposure_auto=1 -c exposure_absolute=5 -c tilt_absolute=0 -c zoom_absolute=0 || true
# v4l2-ctl --set-fmt-video=width=640,height=480,pixelformat=1
echo finishing configuring cameras >> /var/www/html/vision/vision.log
su - ubuntu -c "cd /var/www/html/vision && python detect_goals.py -c >> vision.log 2>&1"
end script