Update from Dan. Fixes conflict between rounding timer values and
authorDavid Schleef <ds@schleef.org>
Sat, 9 Feb 2002 01:38:44 +0000 (01:38 +0000)
committerDavid Schleef <ds@schleef.org>
Sat, 9 Feb 2002 01:38:44 +0000 (01:38 +0000)
speed cutoff.

comedi/drivers/rtd520.c

index d824d552e962c4c3f7d019a324c6aa8b69677440..0f5a1eb70a2a02928238e984d1e9a62e0b9b8320 100644 (file)
@@ -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 {