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
dad367f7
Commit
dad367f7
authored
Dec 13, 2016
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed old inits
parent
de39ccc5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
88 deletions
+15
-88
init_elphel393.py
src/init_elphel393.py
+15
-88
No files found.
src/init_elphel393.py
View file @
dad367f7
...
@@ -165,23 +165,6 @@ def init_mux10359(index):
...
@@ -165,23 +165,6 @@ def init_mux10359(index):
def
init_autoexp_daemon
(
index
):
def
init_autoexp_daemon
(
index
):
shout
(
"autoexposure -p "
+
index
+
" -c 0 -b 0 -d 1 &"
)
shout
(
"autoexposure -p "
+
index
+
" -c 0 -b 0 -d 1 &"
)
def
init_autoexp
(
index
):
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
):
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
):
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
):
...
@@ -241,17 +224,17 @@ def disable_gpio_10389():
...
@@ -241,17 +224,17 @@ def disable_gpio_10389():
switch
=
{
switch
=
{
'usb_hub'
:
1
,
'usb_hub'
:
1
,
'ip'
:
1
,
'ip'
:
1
,
'mcntrl'
:
1
,
'mcntrl'
:
0
,
'imgsrv'
:
1
,
'imgsrv'
:
1
,
'port1'
:
1
,
'port1'
:
0
,
'port2'
:
1
,
'port2'
:
0
,
'port3'
:
1
,
'port3'
:
0
,
'port4'
:
1
,
'port4'
:
0
,
'framepars'
:
1
,
'framepars'
:
0
,
'autoexp_daemon'
:
0
,
'autoexp_daemon'
:
1
,
'autocampars'
:
0
,
'autocampars'
:
1
,
'autoexp'
:
1
,
'autoexp'
:
0
,
'autowb'
:
1
,
'autowb'
:
0
,
'sata'
:
1
,
'sata'
:
1
,
'gps'
:
1
,
'gps'
:
1
,
'eyesis'
:
0
'eyesis'
:
0
...
@@ -299,76 +282,20 @@ else:
...
@@ -299,76 +282,20 @@ else:
log_msg
(
"skip ip"
)
log_msg
(
"skip ip"
)
#2
#2
if
switch
[
'mcntrl'
]
==
1
:
log_msg
(
sys
.
argv
[
0
]
+
": mcntrl"
)
if
switch
[
'eyesis'
]
!=
0
:
init_mcntrl_eyesis
(
PYDIR
,
VERILOG_DIR
)
else
:
init_mcntrl
(
PYDIR
,
VERILOG_DIR
)
else
:
log_msg
(
"skip mcntrl"
)
#3
#3
if
switch
[
'imgsrv'
]
==
1
:
if
switch
[
'imgsrv'
]
==
1
:
log_msg
(
sys
.
argv
[
0
]
+
": imgsrv"
)
log_msg
(
sys
.
argv
[
0
]
+
": imgsrv"
)
init_imgsrv
(
IMGSRV_PORT
)
init_imgsrv
(
IMGSRV_PORT
)
else
:
else
:
log_msg
(
"skip imgsrv"
)
log_msg
(
"skip imgsrv"
)
#4
for
i
in
range
(
1
,
5
):
if
switch
[
'port'
+
str
(
i
)]
==
1
:
init_port
(
str
(
i
-
1
))
else
:
log_msg
(
"skip sensor port "
+
str
(
i
))
#5
#5
if
(
switch
[
'eyesis'
]
!=
0
)
and
(
switch
[
'framepars'
]
!=
0
):
log_msg
(
sys
.
argv
[
0
]
+
": auto exposure and auto white balance"
)
#time.sleep(1)
if
switch
[
'autoexp_daemon'
]
==
1
:
for
i
in
range
(
4
):
sysfs_content
=
init_port_readsysfs
(
"sensor"
+
str
(
i
)
+
"0"
)
if
sysfs_content
==
"mt9p006"
:
shout
(
"wget -O -
\"
localhost/framepars.php?sensor_port="
+
str
(
i
)
+
"&cmd=min_init
\"
"
)
time
.
sleep
(
2
)
shout
(
"cat /proc/interrupts"
)
for
i
in
range
(
4
):
sysfs_content
=
init_port_readsysfs
(
"sensor"
+
str
(
i
)
+
"0"
)
if
sysfs_content
==
"mt9p006"
:
shout
(
"wget -O -
\"
localhost/framepars.php?sensor_port="
+
str
(
i
)
+
"&cmd=eyesis_trig
\"
"
)
time
.
sleep
(
2
)
shout
(
"cat /proc/interrupts"
)
for
i
in
range
(
4
):
sysfs_content
=
init_port_readsysfs
(
"sensor"
+
str
(
i
)
+
"0"
)
if
sysfs_content
==
"mt9p006"
:
log_msg
(
"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
:
log_msg
(
sys
.
argv
[
0
]
+
": auto exposure and auto white balance"
)
for
i
in
range
(
1
,
5
):
for
i
in
range
(
1
,
5
):
if
(
switch
[
'autoexp_daemon'
]
==
1
)
or
(
switch
[
'autoexp'
]
==
1
):
init_autoexp_daemon
(
str
(
i
-
1
))
init_autoexp_daemon
(
str
(
i
-
1
))
if
switch
[
'port'
+
str
(
i
)]
==
1
:
if
switch
[
'autoexp'
]
==
1
:
sysfs_content
=
init_port_readsysfs
(
"sensor"
+
str
(
i
-
1
)
+
"0"
)
if
sysfs_content
==
"mt9p006"
:
init_autoexp
(
str
(
i
-
1
))
else
:
log_msg
(
"Port "
+
str
(
i
)
+
": skip autoexp"
)
if
switch
[
'autowb'
]
==
1
:
sysfs_content
=
init_port_readsysfs
(
"sensor"
+
str
(
i
-
1
)
+
"0"
)
if
sysfs_content
==
"mt9p006"
:
init_autowb
(
str
(
i
-
1
))
else
:
log_msg
(
"Port "
+
str
(
i
)
+
": skip autowb"
)
if
switch
[
'autocampars'
]
==
1
:
if
switch
[
'autocampars'
]
==
1
:
# shout("autocampars.php --init --ignore-revision")
# shout("autocampars.php --init --ignore-revision")
shout
(
"autocampars.php --init"
)
shout
(
"autocampars.php --init"
)
...
...
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