fixed bug in pacing when both convert_src and scan_begin_src are TRIG_TIMER
authorFrank Mori Hess <fmhess@speakeasy.net>
Thu, 22 Nov 2001 15:57:47 +0000 (15:57 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Thu, 22 Nov 2001 15:57:47 +0000 (15:57 +0000)
comedi/drivers/ni_labpc.c

index b72de188097acddc741804dbd6dfb95082f62df6..cda8ec960d1c2345190afcadab8f4f42aa0e9b10 100644 (file)
@@ -1684,7 +1684,7 @@ static void labpc_adc_timing(comedi_device *dev, comedi_cmd *cmd)
        if(cmd->convert_src == TRIG_TIMER && cmd->scan_begin_src == TRIG_TIMER)
        {
                // pick the lowest b0 divisor value we can (for maximum input clock speed on convert and scan counters)
-               devpriv->divisor_b0 = (cmd->convert_arg - 1) / (LABPC_TIMER_BASE * max_counter_value) + 1;
+               devpriv->divisor_b0 = (cmd->scan_begin_arg - 1) / (LABPC_TIMER_BASE * max_counter_value) + 1;
                if(devpriv->divisor_b0 < min_counter_value)
                        devpriv->divisor_b0 = min_counter_value;
                if(devpriv->divisor_b0 > max_counter_value)