From 567f4eb3ec209401259fcef5e794c18ed33f8d3a Mon Sep 17 00:00:00 2001 From: Frank Mori Hess Date: Tue, 8 May 2007 14:28:21 +0000 Subject: [PATCH] Added check against maximum ao update rate in analog output command test. --- comedi/drivers/ni_mio_common.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) 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){ -- 2.26.2