Added check against maximum ao update rate in analog output command test.
authorFrank Mori Hess <fmhess@speakeasy.net>
Tue, 8 May 2007 14:28:21 +0000 (14:28 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Tue, 8 May 2007 14:28:21 +0000 (14:28 +0000)
comedi/drivers/ni_mio_common.c

index e4b7fb612b84edfe62a1d2bb914470c5df59034b..2ad051555ceeb48d09ab879656de13825c19064b 100644 (file)
@@ -2816,15 +2816,12 @@ static int ni_ao_cmdtest(comedi_device *dev,comedi_subdevice *s,comedi_cmd *cmd)
                cmd->start_arg=0;
                err++;
        }
-#if 0
-       /* XXX need ao_speed */
-       if(cmd->scan_begin_arg<boardtype.ao_speed){
-               cmd->scan_begin_arg=boardtype.ao_speed;
+       if(cmd->scan_begin_arg < boardtype.ao_speed){
+               cmd->scan_begin_arg = boardtype.ao_speed;
                err++;
        }
-#endif
-       if(cmd->scan_begin_arg>devpriv->clock_ns*0xffffff){ /* XXX check */
-               cmd->scan_begin_arg=devpriv->clock_ns*0xffffff;
+       if(cmd->scan_begin_arg > devpriv->clock_ns * 0xffffff){ /* XXX check */
+               cmd->scan_begin_arg = devpriv->clock_ns * 0xffffff;
                err++;
        }
        if(cmd->convert_arg!=0){