From cd6660ec5879ed5cda502333405c6e393cf20194 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Tue, 6 Aug 2002 19:39:31 +0000 Subject: [PATCH] Fix mistake getting buffer head position --- demo/mmap.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/demo/mmap.c b/demo/mmap.c index 90b8d31..2da8e40 100644 --- a/demo/mmap.c +++ b/demo/mmap.c @@ -79,9 +79,10 @@ int main(int argc, char *argv[]) exit(1); } + front = 0; back = 0; while(1){ - front = comedi_get_buffer_offset(dev,subdevice); + front += comedi_get_buffer_contents(dev,subdevice); if(verbose)fprintf(stderr,"front = %d, back = %d\n",front,back); if(frontscan_end_src = TRIG_COUNT; cmd->scan_end_arg = n_chan; - cmd->stop_src = TRIG_COUNT; - cmd->stop_arg = n_scan; + cmd->stop_src = TRIG_NONE; + cmd->stop_arg = 0; cmd->chanlist = chanlist; cmd->chanlist_len = n_chan; -- 2.26.2