fixed bug with stop_src == TRIG_NONE introduced with changes for poll() code
authorFrank Mori Hess <fmhess@speakeasy.net>
Sun, 7 Oct 2001 20:45:31 +0000 (20:45 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Sun, 7 Oct 2001 20:45:31 +0000 (20:45 +0000)
comedi/drivers/das16m1.c

index 46647d07565d8e234742f79bf2ce6e3c60c4b358..103dbd895cfe810922b2fd7910772f41d7c52315 100644 (file)
@@ -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;