set default n_scan value to 10 for insn demo, added check that it is
not set larger than MAX_SAMPLES
This commit is contained in:
parent
6dcb08e06b
commit
26769e5635
1 changed files with 5 additions and 0 deletions
|
@ -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){
|
||||
|
|
Loading…
Add table
Reference in a new issue