From: Frank Mori Hess Date: Tue, 8 May 2007 14:28:21 +0000 (+0000) Subject: Added check against maximum ao update rate in analog output command test. X-Git-Tag: r0_7_74~86 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=567f4eb3ec209401259fcef5e794c18ed33f8d3a;p=comedi.git Added check against maximum ao update rate in analog output command test. --- diff --git a/comedi/drivers/ni_mio_common.c b/comedi/drivers/ni_mio_common.c index e4b7fb61..2ad05155 100644 --- a/comedi/drivers/ni_mio_common.c +++ b/comedi/drivers/ni_mio_common.c @@ -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_argscan_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){