Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC ADC 100M 14b 4cha - Testing
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
FMC ADC 100M 14b 4cha - Testing
Commits
e6a85ee5
Commit
e6a85ee5
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
6d0bd8f1
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 @
e6a85ee5
...
...
@@ -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