fixed conversion timing check for TRIG_NOW case
authorFrank Mori Hess <fmhess@speakeasy.net>
Mon, 4 Jun 2001 02:16:30 +0000 (02:16 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Mon, 4 Jun 2001 02:16:30 +0000 (02:16 +0000)
comedi/drivers/comedi_rt_timer.c

index e7553b389edd6fe072c21f0be58992c3b2301470..50f43938cf63eacc7a41a73288685e5bda7f612a 100644 (file)
@@ -236,11 +236,11 @@ static void input_scan_task_func(int d)
                                // conversion timing
                                if(cmd->convert_src == TRIG_TIMER && i){
                                        rt_task_wait_period();
-                               }
-                               ret = check_conversion_timing(dev, scan_start, i);
-                               if(ret < 0){
-                                       comedi_error_done(dev,s);
-                                       goto cleanup;
+                                       ret = check_conversion_timing(dev, scan_start, i);
+                                       if(ret < 0){
+                                               comedi_error_done(dev,s);
+                                               goto cleanup;
+                                       }
                                }
                                ret = comedi_data_read(devpriv->device,devpriv->subd,
                                        CR_CHAN(cmd->chanlist[i]),
@@ -308,11 +308,11 @@ static void output_scan_task_func(int d)
                                // conversion timing
                                if(cmd->convert_src == TRIG_TIMER && i){
                                        rt_task_wait_period();
-                               }
-                               ret = check_conversion_timing(dev, scan_start, i);
-                               if(ret < 0){
-                                       comedi_error_done(dev,s);
-                                       goto cleanup;
+                                       ret = check_conversion_timing(dev, scan_start, i);
+                                       if(ret < 0){
+                                               comedi_error_done(dev,s);
+                                               goto cleanup;
+                                       }
                                }
                                data = buf_remove(dev, s);
                                if(data < 0) {