From: David Schleef Date: Sun, 3 Sep 2000 01:54:27 +0000 (+0000) Subject: fix cmdtest bug for external triggering X-Git-Tag: r0_7_48~9 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=507376e001f527e6083a6be86b810bbebea3ad5a;p=comedi.git fix cmdtest bug for external triggering --- diff --git a/comedi/drivers/ni_mio_common.c b/comedi/drivers/ni_mio_common.c index 66de7a46..b08b8eb0 100644 --- a/comedi/drivers/ni_mio_common.c +++ b/comedi/drivers/ni_mio_common.c @@ -739,13 +739,15 @@ static int ni_ai_cmdtest(comedi_device *dev,comedi_subdevice *s,comedi_cmd *cmd) ni_ns_to_timer(&cmd->scan_begin_arg,cmd->flags&TRIG_ROUND_MASK); if(tmp!=cmd->scan_begin_arg)err++; } - tmp=cmd->convert_arg; - ni_ns_to_timer(&cmd->convert_arg,cmd->flags&TRIG_ROUND_MASK); - if(tmp!=cmd->convert_arg)err++; - if(cmd->scan_begin_src==TRIG_TIMER && - cmd->scan_begin_argconvert_arg*cmd->scan_end_arg){ - cmd->scan_begin_arg=cmd->convert_arg*cmd->scan_end_arg; - err++; + if(cmd->convert_src==TRIG_TIMER){ + tmp=cmd->convert_arg; + ni_ns_to_timer(&cmd->convert_arg,cmd->flags&TRIG_ROUND_MASK); + if(tmp!=cmd->convert_arg)err++; + if(cmd->scan_begin_src==TRIG_TIMER && + cmd->scan_begin_argconvert_arg*cmd->scan_end_arg){ + cmd->scan_begin_arg=cmd->convert_arg*cmd->scan_end_arg; + err++; + } } if(err)return 4;