From: David Schleef Date: Tue, 6 Aug 2002 19:39:31 +0000 (+0000) Subject: Fix mistake getting buffer head position X-Git-Tag: r0_7_21~316 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=cd6660ec5879ed5cda502333405c6e393cf20194;p=comedilib.git Fix mistake getting buffer head position --- 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;