From: David Schleef Date: Sat, 9 Feb 2002 01:38:44 +0000 (+0000) Subject: Update from Dan. Fixes conflict between rounding timer values and X-Git-Tag: r0_7_64~141 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a4512bc69a6d012c072be891df0fb4c359855261;p=comedi.git Update from Dan. Fixes conflict between rounding timer values and speed cutoff. --- diff --git a/comedi/drivers/rtd520.c b/comedi/drivers/rtd520.c index d824d552..0f5a1eb7 100644 --- a/comedi/drivers/rtd520.c +++ b/comedi/drivers/rtd520.c @@ -1175,10 +1175,14 @@ static int rtd_ai_cmdtest ( if (cmd->scan_begin_src == TRIG_TIMER){ if (cmd->scan_begin_arg < RTD_MAX_SPEED) { cmd->scan_begin_arg = RTD_MAX_SPEED; + rtd_ns_to_timer(&cmd->scan_begin_arg, + cmd->flags&TRIG_ROUND_MASK); err++; } if (cmd->scan_begin_arg > RTD_MIN_SPEED) { cmd->scan_begin_arg = RTD_MIN_SPEED; + rtd_ns_to_timer(&cmd->scan_begin_arg, + cmd->flags&TRIG_ROUND_MASK); err++; } } else { @@ -1193,10 +1197,14 @@ static int rtd_ai_cmdtest ( if (cmd->convert_src==TRIG_TIMER) { if (cmd->convert_arg < RTD_MAX_SPEED) { cmd->convert_arg = RTD_MAX_SPEED; + rtd_ns_to_timer(&cmd->convert_arg, + cmd->flags&TRIG_ROUND_MASK); err++; } if (cmd->convert_arg > RTD_MIN_SPEED) { cmd->convert_arg = RTD_MIN_SPEED; + rtd_ns_to_timer(&cmd->convert_arg, + cmd->flags&TRIG_ROUND_MASK); err++; } } else {