Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
Beam Positoning Monitor - Software
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
Beam Positoning Monitor - Software
Commits
da3c9ad1
Commit
da3c9ad1
authored
Aug 13, 2015
by
Lucas Russo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
examples/acq.c: temporary fix to FPGA ACQ CORE hanging
This is a temporary fix to github issue # 104
parent
d02d2aa9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
acq.c
examples/acq.c
+7
-1
No files found.
examples/acq.c
View file @
da3c9ad1
...
...
@@ -19,6 +19,7 @@
#define DFLT_BOARD_NUMBER 0
#define MIN_NUM_SAMPLES 4
/* Arbitrary hard limits */
#define MAX_NUM_SAMPLES (1 << 28)
#define MAX_NUM_CHANS (1 << 8)
...
...
@@ -135,7 +136,12 @@ int main (int argc, char *argv [])
else
{
num_samples
=
strtoul
(
num_samples_str
,
NULL
,
10
);
if
(
num_samples
>
MAX_NUM_SAMPLES
)
{
if
(
num_samples
<
MIN_NUM_SAMPLES
)
{
fprintf
(
stderr
,
"[client:acq]: Number of samples too small! Defaulting to: %u
\n
"
,
MIN_NUM_SAMPLES
);
num_samples
=
MIN_NUM_SAMPLES
;
}
else
if
(
num_samples
>
MAX_NUM_SAMPLES
)
{
fprintf
(
stderr
,
"[client:acq]: Number of samples too big! Defaulting to: %u
\n
"
,
MAX_NUM_SAMPLES
);
num_samples
=
MAX_NUM_SAMPLES
;
...
...
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