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
85e7e58d
Commit
85e7e58d
authored
Aug 21, 2014
by
Matthieu Cattin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test07: fix bug in comparison, was comparing floats instead of integers.
parent
1a01a01d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
test07.py
tests/test07.py
+3
-3
No files found.
tests/test07.py
View file @
85e7e58d
...
@@ -162,7 +162,7 @@ def main (default_directory='.'):
...
@@ -162,7 +162,7 @@ def main (default_directory='.'):
acq_data_mean
=
acq_mean
(
acq_data
)
acq_data_mean
=
acq_mean
(
acq_data
)
for
i
in
range
(
len
(
acq_data_mean
)):
for
i
in
range
(
len
(
acq_data_mean
)):
print
"ADC channel
%
d value:
%
d expected value:
%
d"
%
(
i
+
1
,
acq_data_mean
[
i
],
ADC_POS
)
print
"ADC channel
%
d value:
%
d expected value:
%
d"
%
(
i
+
1
,
acq_data_mean
[
i
],
ADC_POS
)
if
(
ADC_POS
!=
acq_data_mean
[
i
]
):
if
(
ADC_POS
!=
int
(
acq_data_mean
[
i
])
):
print
"Channel
%
d offset circuit is malfunctioning"
%
(
i
+
1
)
print
"Channel
%
d offset circuit is malfunctioning"
%
(
i
+
1
)
error
+=
1
error
+=
1
# raise PtsError('Channel %d offset circuit is malfunctioning'%i)
# raise PtsError('Channel %d offset circuit is malfunctioning'%i)
...
@@ -179,7 +179,7 @@ def main (default_directory='.'):
...
@@ -179,7 +179,7 @@ def main (default_directory='.'):
acq_data_mean
=
acq_mean
(
acq_data
)
acq_data_mean
=
acq_mean
(
acq_data
)
for
i
in
range
(
len
(
acq_data_mean
)):
for
i
in
range
(
len
(
acq_data_mean
)):
print
"ADC channel
%
d value:
%
d expected value:
%
d +/-
%
d"
%
(
i
+
1
,
acq_data_mean
[
i
],
ADC_MID
,
ADC_TOL
)
print
"ADC channel
%
d value:
%
d expected value:
%
d +/-
%
d"
%
(
i
+
1
,
acq_data_mean
[
i
],
ADC_MID
,
ADC_TOL
)
if
((
ADC_MID
-
ADC_TOL
>
acq_data_mean
[
i
])
|
(
ADC_MID
+
ADC_TOL
<
acq_data_mean
[
i
]
)):
if
((
ADC_MID
-
ADC_TOL
>
int
(
acq_data_mean
[
i
]))
|
(
ADC_MID
+
ADC_TOL
<
int
(
acq_data_mean
[
i
])
)):
print
"Channel
%
d offset circuit is malfunctioning"
%
(
i
+
1
)
print
"Channel
%
d offset circuit is malfunctioning"
%
(
i
+
1
)
error
+=
1
error
+=
1
# raise PtsError('Channel %d offset circuit is malfunctioning'%i)
# raise PtsError('Channel %d offset circuit is malfunctioning'%i)
...
@@ -197,7 +197,7 @@ def main (default_directory='.'):
...
@@ -197,7 +197,7 @@ def main (default_directory='.'):
acq_data_mean
=
acq_mean
(
acq_data
)
acq_data_mean
=
acq_mean
(
acq_data
)
for
i
in
range
(
len
(
acq_data_mean
)):
for
i
in
range
(
len
(
acq_data_mean
)):
print
"ADC channel
%
d value:
%
d expected value:
%
d"
%
(
i
+
1
,
acq_data_mean
[
i
],
ADC_NEG
)
print
"ADC channel
%
d value:
%
d expected value:
%
d"
%
(
i
+
1
,
acq_data_mean
[
i
],
ADC_NEG
)
if
(
ADC_NEG
!=
acq_data_mean
[
i
]
):
if
(
ADC_NEG
!=
int
(
acq_data_mean
[
i
])
):
print
"Channel
%
d offset circuit is malfunctioning"
%
(
i
+
1
)
print
"Channel
%
d offset circuit is malfunctioning"
%
(
i
+
1
)
error
+=
1
error
+=
1
# raise PtsError('Channel %d offset circuit is malfunctioning'%i)
# raise PtsError('Channel %d offset circuit is malfunctioning'%i)
...
...
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