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
536de938
Commit
536de938
authored
Oct 07, 2020
by
Federico Vaga
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'release/v2.5.4' into master
parents
aac876d9
d611120f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
5 deletions
+30
-5
CHANGELOG.rst
CHANGELOG.rst
+20
-0
PyAdcLib.py
PyAdcLib/PyAdcLib/PyAdcLib.py
+1
-1
fmc-adc-100m14b4cha.c
lib/fmc-adc-100m14b4cha.c
+1
-1
test_adc_acquisition.py
pytest/fmc-adc-100m14b4cha/test_adc_acquisition.py
+8
-3
No files found.
CHANGELOG.rst
0 → 100644
View file @
536de938
..
SPDX-License-Identifier: CC-0.0
SPDX-FileCopyrightText: 2019 CERN
=========
Changelog
=========
2.5.4 - 2020-10-07
==================
Added
-----
- tst: text acquisitions with negative patterns
Fixed
-----
- py: fix path to debugfs options "pattern data"
- lib: fix path to debugfs options "trigger software"
- tst: fix PyAdcBuf pointer usage to use get_sample()
PyAdcLib/PyAdcLib/PyAdcLib.py
View file @
536de938
...
...
@@ -588,7 +588,7 @@ class PyFmcAdc100m14b4ch(PyAdcAbstract):
def
__init__
(
self
,
devid
):
super
(
PyFmcAdc100m14b4ch
,
self
)
.
__init__
(
devid
)
self
.
__dbg_path
=
"/sys/kernel/debug/
adc-100m14b-{:04x}
/"
.
format
(
self
.
dev_id
)
self
.
__dbg_path
=
"/sys/kernel/debug/
fmc-adc-100m.{:d}.auto
/"
.
format
(
self
.
dev_id
)
@
property
def
pattern_data
(
self
):
...
...
lib/fmc-adc-100m14b4cha.c
View file @
536de938
...
...
@@ -918,7 +918,7 @@ static int adc_100m14b4cha_trigger_fire(struct adc_dev *dev)
int
fd
,
ret
;
snprintf
(
pathname
,
sizeof
(
pathname
),
"/sys/kernel/debug/
adc-100m14b-%04x
/trigger_software"
,
"/sys/kernel/debug/
fmc-adc-100m.%d.auto
/trigger_software"
,
fa
->
dev_id
);
fd
=
open
(
pathname
,
O_WRONLY
);
if
(
fd
<
0
)
...
...
pytest/fmc-adc-100m14b4cha/test_adc_acquisition.py
View file @
536de938
...
...
@@ -7,7 +7,8 @@ import pytest
import
time
from
PyAdcLib
import
PyAdcConf
,
PyFmcAdc100m14b4ch
,
timeval
@
pytest
.
fixture
(
scope
=
"function"
,
params
=
[
1
<<
i
for
i
in
range
(
14
)])
@
pytest
.
fixture
(
scope
=
"function"
,
params
=
[
1
<<
i
for
i
in
range
(
14
)]
+
\
[
0x2000
+
(
1
<<
i
)
for
i
in
range
(
13
)])
def
adc_simple_pattern
(
adc_simple
,
request
):
adc_simple
.
pattern_data
=
request
.
param
yield
adc_simple
...
...
@@ -70,7 +71,11 @@ class TestAdcAcquisitionPattern(object):
for
n
in
range
(
nshots
):
for
chan
in
range
(
4
):
for
s
in
range
(
nsamples
):
assert
buf
.
get_sample
(
chan
,
s
)
>>
2
==
pattern
,
\
buf
.
contents
.
data
[:
nsamples
]
sample
=
abs
(
buf
.
contents
.
get_sample
(
chan
,
s
)
>>
2
)
if
pattern
>=
0x2000
:
# for negative numbers
assert
0x4000
==
pattern
+
sample
,
buf
.
contents
.
data
[:
nsamples
]
else
:
assert
sample
==
pattern
,
buf
.
contents
.
data
[:
nsamples
]
adc_simple_pattern
.
release_buffer
(
buf
,
None
)
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