Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC ADC 100M 14b 4cha - Software
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 - Software
Commits
aa93b886
Commit
aa93b886
authored
Apr 25, 2014
by
Michel Arruat
Committed by
Federico Vaga
Apr 30, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fald-acq: open by devid instead of lun
parent
ffa3a2cd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
fald-acq.c
libtools/fald-acq.c
+5
-5
No files found.
libtools/fald-acq.c
View file @
aa93b886
...
...
@@ -454,7 +454,7 @@ int main(int argc, char *argv[])
{
struct
fmcadc_buffer
*
buf
;
int
i
,
err
;
unsigned
int
lun
=
0
;
unsigned
int
devid
=
0
;
FILE
*
f
=
NULL
;
char
fname
[
PATH_MAX
];
char
cmd
[
256
];
...
...
@@ -468,11 +468,11 @@ int main(int argc, char *argv[])
}
/* set local _argv[0] with pg name */
_argv
[
0
]
=
argv
[
0
];
/*
lun
is the last arg */
sscanf
(
argv
[
argc
-
1
],
"%x"
,
&
lun
);
/*
devid
is the last arg */
sscanf
(
argv
[
argc
-
1
],
"%x"
,
&
devid
);
/* Open the ADC */
adc
=
fmcadc_open
_by_lun
(
"fmc-adc-100m14b4cha"
,
lun
,
adc
=
fmcadc_open
(
"fmc-adc-100m14b4cha"
,
devid
,
/* nshots * (presamples + postsamples) */
/*
acq.value[FMCADC_CONF_ACQ_N_SHOTS] *
...
...
@@ -726,7 +726,7 @@ int main(int argc, char *argv[])
start_adc
(
"End of data processing"
,
0
);
else
if
(
plot_chno
!=
-
1
)
{
if
((
plot_chno
>=
1
)
&&
(
plot_chno
<=
4
)
)
{
snprintf
(
fname
,
sizeof
(
fname
),
"/tmp/fmcadc.0x%04x.ch%d.dat"
,
lun
,
plot_chno
);
snprintf
(
fname
,
sizeof
(
fname
),
"/tmp/fmcadc.0x%04x.ch%d.dat"
,
devid
,
plot_chno
);
if
(
write_file
(
fname
,
plot_chno
,
(
int16_t
*
)
buf
->
data
,
(
ctrl
->
nsamples
)
/
4
)
<
0
)
{
printf
(
"Write data into file %s failed
\n
"
,
fname
);
...
...
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