From d59513479b363fb011dae3bad585f78f215ac01d Mon Sep 17 00:00:00 2001 From: David Schleef Date: Sat, 11 May 2002 06:43:30 +0000 Subject: [PATCH] Use n_scans as the number of samples to measure. --- demo/insn.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/demo/insn.c b/demo/insn.c index 27c93d4..658715c 100644 --- a/demo/insn.c +++ b/demo/insn.c @@ -35,7 +35,7 @@ * analog input, and the another gettimeofday() call. */ -#define N_SAMPLES 10 +#define MAX_SAMPLES 128 comedi_t *device; @@ -45,7 +45,7 @@ int main(int argc, char *argv[]) comedi_insn insn[3]; comedi_insnlist il; struct timeval t1,t2; - lsampl_t data[N_SAMPLES]; + lsampl_t data[MAX_SAMPLES]; parse_options(argc,argv); @@ -73,7 +73,7 @@ int main(int argc, char *argv[]) /* Instruction 1: do 10 analog input reads */ insn[1].insn=INSN_READ; - insn[1].n=N_SAMPLES; + insn[1].n=n_scan; insn[1].data=data; insn[1].subdev=subdevice; insn[1].chanspec=CR_PACK(channel,range,aref); @@ -90,7 +90,7 @@ int main(int argc, char *argv[]) } printf("initial time: %ld.%06ld\n",t1.tv_sec,t1.tv_usec); - for(i=0;i