Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
elphel-init
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Elphel
elphel-init
Commits
bc1b3331
Commit
bc1b3331
authored
Nov 07, 2016
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init eyesis
parent
ffe56137
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
4 deletions
+19
-4
init_elphel393.py
src/init_elphel393.py
+19
-4
No files found.
src/init_elphel393.py
View file @
bc1b3331
...
@@ -39,7 +39,7 @@ import os
...
@@ -39,7 +39,7 @@ import os
#params
#params
SENSOR_TYPE
=
5
SENSOR_TYPE
=
5
IPADDR
=
"192.168.0.
9
"
IPADDR
=
"192.168.0.
161
"
IMGSRV_PORT
=
2323
IMGSRV_PORT
=
2323
CAMOGM_PORT
=
3456
CAMOGM_PORT
=
3456
CAMOGM_PIPE
=
"/var/volatile/camogm_cmd"
CAMOGM_PIPE
=
"/var/volatile/camogm_cmd"
...
@@ -100,12 +100,21 @@ def init_autoexp(index):
...
@@ -100,12 +100,21 @@ def init_autoexp(index):
shout
(
"autoexposure -p "
+
index
+
" -c 0 -b 0 -d 1 &"
)
shout
(
"autoexposure -p "
+
index
+
" -c 0 -b 0 -d 1 &"
)
shout
(
"wget -O /dev/null
\"
localhost/parsedit.php?immediate&sensor_port="
+
index
+
"&COMPRESSOR_RUN=2&DAEMON_EN=1*12&AUTOEXP_ON=1&AEXP_FRACPIX=0xff80&AEXP_LEVEL=0xf800&AE_PERIOD=4&AE_THRESH=500&HIST_DIM_01=0x0a000a00&HIST_DIM_23=0x0a000a00&EXP_AHEAD=3
\"
"
)
shout
(
"wget -O /dev/null
\"
localhost/parsedit.php?immediate&sensor_port="
+
index
+
"&COMPRESSOR_RUN=2&DAEMON_EN=1*12&AUTOEXP_ON=1&AEXP_FRACPIX=0xff80&AEXP_LEVEL=0xf800&AE_PERIOD=4&AE_THRESH=500&HIST_DIM_01=0x0a000a00&HIST_DIM_23=0x0a000a00&EXP_AHEAD=3
\"
"
)
def
init_autoexp_eyesis
(
index
):
shout
(
"autoexposure -p "
+
index
+
" -c 0 -b 0 -d 1 &"
)
roi
=
"HISTWND_RWIDTH=0xc000&HISTWND_RHEIGHT=0xffff&HISTWND_RLEFT=0xffff&HISTWND_RTOP=0x8000"
shout
(
"wget -O /dev/null
\"
localhost/parsedit.php?immediate&sensor_port="
+
index
+
"&COMPRESSOR_RUN=2&DAEMON_EN=1*12&AUTOEXP_ON=1&AEXP_FRACPIX=0xff80&AEXP_LEVEL=0xf800&AUTOEXP_EXP_MAX=5000&AE_PERIOD=4&AE_THRESH=500&HIST_DIM_01=0x0a000a00&HIST_DIM_23=0x0a000a00&EXP_AHEAD=1&"
+
roi
+
"
\"
"
)
def
init_autowb
(
index
):
def
init_autowb
(
index
):
shout
(
"wget -O /dev/null
\"
localhost/parsedit.php?immediate&sensor_port="
+
index
+
"&COMPRESSOR_RUN=2&DAEMON_EN=1&WB_EN=0x1&WB_MASK=0xd&WB_PERIOD=16&WB_WHITELEV=0xfae1&WB_WHITEFRAC=0x028f&WB_SCALE_R=0x10000&WB_SCALE_GB=0x10000&WB_SCALE_B=0x10000&WB_THRESH=500&GAIN_MIN=0x20000&GAIN_MAX=0xfc000&ANA_GAIN_ENABLE=1&GAINR=0x10000&GAING=0x10000&GAINGB=0x10000&GAINB=0x10000
\"
"
)
shout
(
"wget -O /dev/null
\"
localhost/parsedit.php?immediate&sensor_port="
+
index
+
"&COMPRESSOR_RUN=2&DAEMON_EN=1&WB_EN=0x1&WB_MASK=0xd&WB_PERIOD=16&WB_WHITELEV=0xfae1&WB_WHITEFRAC=0x028f&WB_SCALE_R=0x10000&WB_SCALE_GB=0x10000&WB_SCALE_B=0x10000&WB_THRESH=500&GAIN_MIN=0x20000&GAIN_MAX=0xfc000&ANA_GAIN_ENABLE=1&GAINR=0x10000&GAING=0x10000&GAINGB=0x10000&GAINB=0x10000
\"
"
)
def
init_autowb_eyesis
(
index
):
def
init_autowb_eyesis
(
index
):
shout
(
"wget -O /dev/null
\"
localhost/parsedit.php?immediate&sensor_port="
+
index
+
"&COMPRESSOR_RUN=2&DAEMON_EN=1&WB_EN=0x0&WB_MASK=0xd&WB_PERIOD=16&WB_WHITELEV=0xfae1&WB_WHITEFRAC=0x028f&WB_SCALE_R=0x10000&WB_SCALE_GB=0x10000&WB_SCALE_B=0x10000&WB_THRESH=500&GAIN_MIN=0x20000&GAIN_MAX=0xfc000&ANA_GAIN_ENABLE=1&GAINR=0x1be3e&GAING=0x18000&GAINGB=0x18000&GAINB=0x26667
\"
"
)
shout
(
"wget -O /dev/null
\"
localhost/parsedit.php?immediate&sensor_port="
+
index
+
"&COMPRESSOR_RUN=2&DAEMON_EN=1&WB_EN=0x0&WB_MASK=0xd&WB_PERIOD=16&WB_WHITELEV=0xfae1&WB_WHITEFRAC=0x028f&WB_SCALE_R=0x10000&WB_SCALE_GB=0x10000&WB_SCALE_B=0x10000&WB_THRESH=500&GAIN_MIN=0x20000&GAIN_MAX=0xfc000&ANA_GAIN_ENABLE=1&GAINR=0x1be3e&GAING=0x18000&GAINGB=0x18000&GAINB=0x26667
\"
"
)
def
init_other_eyesis
(
index
):
shout
(
"wget -O /dev/null
\"
localhost/camogm_interface.php?cmd=set_parameter&sensor_port="
+
index
+
"&pname=QUALITY&pvalue=97
\"
"
)
shout
(
"wget -O /dev/null
\"
localhost/camogm_interface.php?cmd=set_parameter&sensor_port="
+
index
+
"&pname=COLOR&pvalue=5
\"
"
)
def
init_sata
(
sata_en
,
pydir
):
def
init_sata
(
sata_en
,
pydir
):
if
(
sata_en
==
1
):
if
(
sata_en
==
1
):
shout
(
pydir
+
"/x393sata.py"
)
shout
(
pydir
+
"/x393sata.py"
)
...
@@ -230,6 +239,15 @@ if switch['eyesis']!=0:
...
@@ -230,6 +239,15 @@ if switch['eyesis']!=0:
time
.
sleep
(
2
)
time
.
sleep
(
2
)
shout
(
"cat /proc/interrupts"
)
shout
(
"cat /proc/interrupts"
)
for
i
in
range
(
4
):
sysfs_content
=
init_port_readsysfs
(
"sensor"
+
str
(
i
)
+
"0"
)
if
sysfs_content
==
"mt9p006"
:
print
(
"AUTOEXP und AUTOWB, channel = "
+
str
(
i
))
init_other_eyesis
(
str
(
i
))
time
.
sleep
(
1
)
init_autoexp_eyesis
(
str
(
i
))
init_autowb_eyesis
(
str
(
i
))
else
:
else
:
print
(
sys
.
argv
[
0
]
+
": auto exposure and auto white balance"
)
print
(
sys
.
argv
[
0
]
+
": auto exposure and auto white balance"
)
for
i
in
range
(
1
,
5
):
for
i
in
range
(
1
,
5
):
...
@@ -244,9 +262,6 @@ else:
...
@@ -244,9 +262,6 @@ else:
if
switch
[
'autowb'
]
==
1
:
if
switch
[
'autowb'
]
==
1
:
sysfs_content
=
init_port_readsysfs
(
"sensor"
+
str
(
i
-
1
)
+
"0"
)
sysfs_content
=
init_port_readsysfs
(
"sensor"
+
str
(
i
-
1
)
+
"0"
)
if
sysfs_content
==
"mt9p006"
:
if
sysfs_content
==
"mt9p006"
:
if
switch
[
'eyesis'
]
!=
0
:
init_autowb_eyesis
(
str
(
i
-
1
))
else
:
init_autowb
(
str
(
i
-
1
))
init_autowb
(
str
(
i
-
1
))
else
:
else
:
print
(
"Port "
+
str
(
i
)
+
": skip autowb"
)
print
(
"Port "
+
str
(
i
)
+
": skip autowb"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment