From: Frank Mori Hess Date: Sun, 7 Oct 2001 20:45:31 +0000 (+0000) Subject: fixed bug with stop_src == TRIG_NONE introduced with changes for poll() code X-Git-Tag: r0_7_61~43 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=97b5da56f4bd3f0dfb56b2b554afa9683ba16ce8;p=comedi.git fixed bug with stop_src == TRIG_NONE introduced with changes for poll() code --- diff --git a/comedi/drivers/das16m1.c b/comedi/drivers/das16m1.c index 46647d07..103dbd89 100644 --- a/comedi/drivers/das16m1.c +++ b/comedi/drivers/das16m1.c @@ -527,8 +527,11 @@ static void das16m1_handler(comedi_device *dev, unsigned int status) num_samples = - hw_counter - devpriv->adc_count; } // check if we only need some of the points - if(num_samples > cmd->stop_arg * cmd->chanlist_len) - num_samples = cmd->stop_arg * cmd->chanlist_len; + if(cmd->stop_src == TRIG_COUNT) + { + if(num_samples > cmd->stop_arg * cmd->chanlist_len) + num_samples = cmd->stop_arg * cmd->chanlist_len; + } // make sure we dont try to get too many points if fifo has overrun if(num_samples > FIFO_SIZE) num_samples = FIFO_SIZE;