From 4b56f24232844066dcdc62d349f565d6530e6ada Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Tue, 13 Mar 2012 08:41:24 -0400 Subject: [PATCH] Add `chanlist_len` to `comedi_get_cmd_generic_timed()` calls in Python demos. This catches the Python demos up to: commit 003b9ec501b5c69f25bfbc68e8b3f923d482bb04 Author: Ian Abbott Date: Mon Nov 8 11:01:42 2010 +0000 Add chanlist_len parameter to comedi_get_cmd_generic_timed. --- demo/python/cmd.py | 2 +- demo/python/info.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/demo/python/cmd.py b/demo/python/cmd.py index b970ef0..11994b0 100755 --- a/demo/python/cmd.py +++ b/demo/python/cmd.py @@ -86,7 +86,7 @@ def dump_cmd(cmd): #construct a comedi command cmd = c.comedi_cmd_struct() -ret = c.comedi_get_cmd_generic_timed(dev,subdevice,cmd,1.0e9/freq) +ret = c.comedi_get_cmd_generic_timed(dev,subdevice,cmd,nchans,1.0e9/freq) if ret: raise "Error comedi_get_cmd_generic failed" cmd.chanlist = mylist # adjust for our particular context diff --git a/demo/python/info.py b/demo/python/info.py index fa26c06..15393e0 100755 --- a/demo/python/info.py +++ b/demo/python/info.py @@ -86,7 +86,7 @@ def probe_max_1chan(dev,s): buf="" cmd=c.comedi_cmd_struct() print "\tcommand fast 1chan:" - if(c.comedi_get_cmd_generic_timed(dev,s,cmd,1)<0): + if(c.comedi_get_cmd_generic_timed(dev,s,cmd,1,1)<0): print "\t\tnot supported" else: print "\tstart: %s %d" % (cmd_src(cmd.start_src,buf),cmd.start_arg) -- 2.26.2