From a4512bc69a6d012c072be891df0fb4c359855261 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Sat, 9 Feb 2002 01:38:44 +0000 Subject: [PATCH] Update from Dan. Fixes conflict between rounding timer values and speed cutoff. --- comedi/drivers/rtd520.c | 8 ++++++++ 1 file changed, 8 insertions(+) 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 { -- 2.26.2