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
ff7dbb03
Commit
ff7dbb03
authored
Dec 13, 2016
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed old vars
parent
dad367f7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
43 deletions
+1
-43
init_elphel393.py
src/init_elphel393.py
+1
-43
No files found.
src/init_elphel393.py
View file @
ff7dbb03
...
...
@@ -122,47 +122,13 @@ def shout(cmd):
def
init_ipaddr
(
ip
):
shout
(
"ifconfig eth0 "
+
ip
)
def
init_mcntrl
(
pydir
,
verilogdir
):
shout
(
pydir
+
"/test_mcntrl.py @"
+
verilogdir
+
"/hargs"
)
def
init_mcntrl_eyesis
(
pydir
,
verilogdir
):
shout
(
pydir
+
"/test_mcntrl.py @"
+
verilogdir
+
"/hargs-eyesis"
)
def
init_imgsrv
(
port
):
shout
(
"imgsrv -p "
+
str
(
port
))
#restart PHP - it can get errors while opening/mmaping at startup, then some functions fail
shout
(
"killall lighttpd; /usr/sbin/lighttpd -f /etc/lighttpd.conf"
)
shout
(
"/www/pages/exif.php init=/etc/Exif_template.xml"
)
def
init_port
(
index
):
sysfs_content
=
init_port_readsysfs
(
"port_mux"
+
index
)
if
sysfs_content
==
"mux10359"
:
init_mux10359
(
index
)
else
:
sysfs_content
=
init_port_readsysfs
(
"sensor"
+
index
+
"0"
)
#Sensor list
#1. mt9p006
#2. mt9f002
#3. ...
if
(
sysfs_content
==
"mt9p006"
):
log_msg
(
"Port "
+
index
+
": framepars enable"
)
shout
(
"wget -O /dev/null
\"
localhost/framepars.php?sensor_port="
+
index
+
"&cmd=init
\"
"
)
else
:
switch
[
'port'
+
str
(
i
)]
=
0
log_msg
(
"Sensor port "
+
str
(
i
)
+
": disabled, please check device tree"
)
def
init_port_readsysfs
(
filename
):
sysfs_content
=
""
with
open
(
"/sys/devices/soc0/elphel393-detect_sensors@0/"
+
filename
,
'r'
)
as
content_file
:
sysfs_content
=
content_file
.
read
()
sysfs_content
=
sysfs_content
.
strip
()
return
sysfs_content
def
init_mux10359
(
index
):
shout
(
"cat /usr/local/verilog/x359.bit > /dev/sfpgaconfjtag"
+
index
)
def
init_autoexp_daemon
(
index
):
shout
(
"autoexposure -p "
+
index
+
" -c 0 -b 0 -d 1 &"
)
...
...
@@ -224,17 +190,9 @@ def disable_gpio_10389():
switch
=
{
'usb_hub'
:
1
,
'ip'
:
1
,
'mcntrl'
:
0
,
'imgsrv'
:
1
,
'port1'
:
0
,
'port2'
:
0
,
'port3'
:
0
,
'port4'
:
0
,
'framepars'
:
0
,
'autoexp_daemon'
:
1
,
'autocampars'
:
1
,
'autoexp'
:
0
,
'autowb'
:
0
,
'sata'
:
1
,
'gps'
:
1
,
'eyesis'
:
0
...
...
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