From 309fc0d7f84aa27d4a46938ad2ca37628d83789d Mon Sep 17 00:00:00 2001 From: Ian Abbott Date: Mon, 8 Nov 2010 11:38:40 +0000 Subject: [PATCH] Include chanlist length in call to comedi_get_cmd_generic_timed. Truncate the Float period to an integer. --- swig/ruby/demo/cmd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/swig/ruby/demo/cmd b/swig/ruby/demo/cmd index 4a2d56b..10da076 100755 --- a/swig/ruby/demo/cmd +++ b/swig/ruby/demo/cmd @@ -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 -- 2.26.2