Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
A
adc-lib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
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
adc-lib
Commits
038c9976
Commit
038c9976
authored
Aug 14, 2020
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tst: release buffers after use
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
49d395eb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
test_adc_trigger.py
pytest/fmc-adc-100m14b4cha/test_adc_trigger.py
+4
-2
No files found.
pytest/fmc-adc-100m14b4cha/test_adc_trigger.py
View file @
038c9976
...
...
@@ -156,7 +156,7 @@ class TestAdcTriggerThreshold(object):
value
=
(
threshold
>>
2
)
+
1
adc_simple
.
pattern_data
=
value
adc_simple
.
acq_poll
(
0
,
timeval
(
0
,
1000
))
buf
=
adc_simple
.
request_buffer
(
3
,
None
,
0
)
buf
=
adc_simple
.
request_buffer
(
1024
,
None
,
0
)
adc_simple
.
fill_buffer
(
buf
,
0
,
timeval
(
10
,
0
))
assert
buf
.
contents
.
nsamples
==
3
assert
adc_buffer_get_sample
(
buf
,
channel
,
0
)
==
min_value
,
\
...
...
@@ -165,6 +165,7 @@ class TestAdcTriggerThreshold(object):
buf
.
contents
.
data
[:
3
*
4
]
assert
adc_buffer_get_sample
(
buf
,
channel
,
2
)
==
value
<<
2
,
\
buf
.
contents
.
data
[:
3
*
4
]
adc_simple
.
release_buffer
(
buf
,
None
)
adc_simple
.
acq_start
(
PyFmcAdc100m14b4ch
.
ADC_F_FLUSH
,
timeval
(
0
,
0
))
adc_simple
.
pattern_data
=
min_value
...
...
@@ -203,7 +204,7 @@ class TestAdcTriggerThreshold(object):
value
=
(
threshold
>>
2
)
-
1
adc_simple
.
pattern_data
=
value
adc_simple
.
acq_poll
(
0
,
timeval
(
0
,
1000
))
buf
=
adc_simple
.
request_buffer
(
3
,
None
,
0
)
buf
=
adc_simple
.
request_buffer
(
1024
,
None
,
0
)
adc_simple
.
fill_buffer
(
buf
,
0
,
timeval
(
10
,
0
))
assert
buf
.
contents
.
nsamples
==
3
assert
adc_buffer_get_sample
(
buf
,
channel
,
0
)
==
max_value
<<
2
,
\
...
...
@@ -212,6 +213,7 @@ class TestAdcTriggerThreshold(object):
buf
.
contents
.
data
[:
3
*
4
]
assert
adc_buffer_get_sample
(
buf
,
channel
,
2
)
==
value
<<
2
,
\
buf
.
contents
.
data
[:
3
*
4
]
adc_simple
.
release_buffer
(
buf
,
None
)
adc_simple
.
acq_start
(
PyFmcAdc100m14b4ch
.
ADC_F_FLUSH
,
timeval
(
0
,
0
))
adc_simple
.
pattern_data
=
max_value
...
...
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