projects
/
comedilib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6dcb08e
)
set default n_scan value to 10 for insn demo, added check that it is
author
Frank Mori Hess
<fmhess@speakeasy.net>
Wed, 5 Mar 2003 17:01:34 +0000
(17:01 +0000)
committer
Frank Mori Hess
<fmhess@speakeasy.net>
Wed, 5 Mar 2003 17:01:34 +0000
(17:01 +0000)
not set larger than MAX_SAMPLES
demo/insn.c
patch
|
blob
|
history
diff --git
a/demo/insn.c
b/demo/insn.c
index 80f1d675f7563df618aabd491c96049ba3203f23..33978bcf761e8679ca7e5e80fff2eb916a10011a 100644
(file)
--- a/
demo/insn.c
+++ b/
demo/insn.c
@@
-48,7
+48,12
@@
int main(int argc, char *argv[])
struct timeval t1,t2;
lsampl_t data[MAX_SAMPLES];
+ n_scan = 10; /* override default n_scan value to something more suitable */
parse_options(argc,argv);
+ if( n_scan > MAX_SAMPLES ){
+ fprintf( stderr, "Requested too many samples, reducing to %i\n", MAX_SAMPLES );
+ n_scan = MAX_SAMPLES;
+ }
device=comedi_open(filename);
if(!device){