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
b220e1df
Commit
b220e1df
authored
Nov 07, 2016
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:Elphel/elphel-init
parents
29e7a249
ffe56137
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
1 deletion
+20
-1
init_elphel393.py
src/init_elphel393.py
+20
-1
No files found.
src/init_elphel393.py
100644 → 100755
View file @
b220e1df
...
...
@@ -137,6 +137,11 @@ def start_gps_compass():
"""
shout
(
"start_gps_compass.php"
)
def
disable_gpio_10389
():
gpio_10389
=
"/sys/devices/soc0/elphel393-pwr@0/gpio_10389"
shout
(
"echo '0x101' > "
+
gpio_10389
)
#power on
shout
(
"echo '0x100' > "
+
gpio_10389
)
#power off
time
.
sleep
(
1
)
#main
...
...
@@ -165,6 +170,11 @@ if len(sys.argv) > 1:
#pre
os
.
mkdir
(
'/var/volatile/html'
)
#need to disable fan for eyesis
if
switch
[
'eyesis'
]
!=
0
:
print
(
'Eyesis mode: turn off gpio 10389'
)
disable_gpio_10389
()
#0
if
switch
[
'usb_hub'
]
==
1
:
print
(
'Initialize USB hub'
)
...
...
@@ -213,12 +223,14 @@ if switch['eyesis']!=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"
)
else
:
print
(
sys
.
argv
[
0
]
+
": auto exposure and auto white balance"
)
...
...
@@ -269,4 +281,11 @@ else:
shout
(
"mkdir /var/volatile/state"
)
# start temperature monitor and let it control fan (set 'off' to disable fan control)
shout
(
"tempmon.py --control_fan on &"
)
if
switch
[
'eyesis'
]
!=
0
:
print
(
"Eyesis: fan off"
)
shout
(
"tempmon.py --control_fan off &"
)
else
:
print
(
"Fan on"
)
shout
(
"tempmon.py --control_fan on &"
)
print
(
"init_elphel393.py DONE"
)
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