Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
x393
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
x393
Commits
9cd86c61
Commit
9cd86c61
authored
Aug 26, 2016
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added 'all' option for sensor port
parent
c270771c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
2 deletions
+24
-2
x393_frame_sequencer.py
py393/x393_frame_sequencer.py
+24
-2
No files found.
py393/x393_frame_sequencer.py
View file @
9cd86c61
...
@@ -65,11 +65,22 @@ class X393FrameSequencer(object):
...
@@ -65,11 +65,22 @@ class X393FrameSequencer(object):
stop
=
False
):
stop
=
False
):
"""
"""
Control frame sequence
Control frame sequence
@param num_sensor - sensor channel number
@param num_sensor - sensor channel number
(0 ..3 or All)
@param reset - reset sequencer (also stops)
@param reset - reset sequencer (also stops)
@param start - start sequencer
@param start - start sequencer
@param stop - stop sequencer
@param stop - stop sequencer
"""
"""
try
:
if
(
num_sensor
==
all
)
or
(
num_sensor
[
0
]
.
upper
()
==
"A"
):
#all is a built-in function
for
num_sensor
in
range
(
4
):
self
.
ctrl_cmd_frame_sequencer
(
num_sensor
,
reset
=
False
,
start
=
False
,
stop
=
False
)
return
except
:
pass
data
=
0
;
data
=
0
;
if
reset
:
if
reset
:
data
|=
1
<<
vrlg
.
CMDFRAMESEQ_RST_BIT
data
|=
1
<<
vrlg
.
CMDFRAMESEQ_RST_BIT
...
@@ -89,13 +100,24 @@ class X393FrameSequencer(object):
...
@@ -89,13 +100,24 @@ class X393FrameSequencer(object):
data
):
data
):
"""
"""
Schedule/execute frame sequence command (register write)
Schedule/execute frame sequence command (register write)
@param num_sensor - sensor channel number
@param num_sensor - sensor channel number
(or All)
@param relative - False - use absolute address (0..15), True - use relative (to current frame) address - 0..14
@param relative - False - use absolute address (0..15), True - use relative (to current frame) address - 0..14
writes to relative address 0 are considered ASAP and do not wait for the frame sync
writes to relative address 0 are considered ASAP and do not wait for the frame sync
@param frame_addr - 4-bit frame address (relative or absolute), relative must be < 15
@param frame_addr - 4-bit frame address (relative or absolute), relative must be < 15
@param addr; // command address (register to which command should be applied), 32 word (not byte) address, relative to maxi0 space
@param addr; // command address (register to which command should be applied), 32 word (not byte) address, relative to maxi0 space
@param data; // command data to write
@param data; // command data to write
"""
"""
try
:
if
(
num_sensor
==
all
)
or
(
num_sensor
[
0
]
.
upper
()
==
"A"
):
#all is a built-in function
for
num_sensor
in
range
(
4
):
self
.
write_cmd_frame_sequencer
(
num_sensor
,
relative
,
frame_addr
,
addr
,
data
)
return
except
:
pass
frame_addr
&=
0xf
frame_addr
&=
0xf
if
relative
and
(
frame_addr
==
0xf
):
if
relative
and
(
frame_addr
==
0xf
):
raise
Exception
(
"task write_cmd_frame_sequencer(): relative address 0xf is invalid, it is reserved for module control"
)
raise
Exception
(
"task write_cmd_frame_sequencer(): relative address 0xf is invalid, it is reserved for module control"
)
...
...
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