Include chanlist length in call to comedi_get_cmd_generic_timed.
authorIan Abbott <abbotti@mev.co.uk>
Mon, 8 Nov 2010 11:38:40 +0000 (11:38 +0000)
committerIan Abbott <abbotti@mev.co.uk>
Mon, 8 Nov 2010 11:38:40 +0000 (11:38 +0000)
Truncate the Float period to an integer.

swig/ruby/demo/cmd

index 4a2d56b5be37be440bc2acb9728bc64f78e20d80..10da0769046f4ec62a077270df7a640cfabbe138 100755 (executable)
@@ -14,8 +14,8 @@ class SWIG::TYPE_p_comedi_t_struct
 
     def prepare_cmd_lib(subdevice, freq, cmd)
        begin
-           cmd = get_cmd_generic_timed(subdevice, cmd,
-               1000000000.0 / freq)
+           cmd = get_cmd_generic_timed(subdevice, cmd, $n_chan,
+               (1000000000.0 / freq).truncate)
        rescue ComediError
            printf("comedi_get_cmd_generic_timed failed\n")
            return cmd