Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
pts
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
misc
pts
Commits
49f32043
Commit
49f32043
authored
Jan 19, 2012
by
Matthieu Cattin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change parameter order for select_output_ch and set to 100mV range by default, comment out prints
parent
d8521b42
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
calibr_box.py
test/fmcadc100m14b4cha/python/calibr_box.py
+3
-3
No files found.
test/fmcadc100m14b4cha/python/calibr_box.py
View file @
49f32043
...
...
@@ -43,12 +43,12 @@ class CCalibr_box:
# Select which channel is connected to AWG
# others are set to Vref for the selected range
# !! ONLY FOR BOX V2 !!
def
select_output_ch
(
self
,
out
,
channel
):
def
select_output_ch
(
self
,
channel
,
out
=
'100mV'
):
if
channel
>=
1
and
channel
<=
4
:
value
=
((
channel
-
1
)
<<
2
)
else
:
raise
Exception
(
'Invalid channel number, must be [1..4]!'
)
print
hex
(
value
)
#
print hex(value)
if
(
'10V'
==
out
):
value
+=
0x3
elif
(
'1V'
==
out
):
...
...
@@ -57,7 +57,7 @@ class CCalibr_box:
value
+=
0x0
else
:
raise
Exception
(
'Invalid output selection!'
)
print
hex
(
value
)
#
print hex(value)
self
.
cp210x
.
gpio_set
(
value
)
def
get_config
(
self
):
...
...
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