From: W. Trevor King Date: Tue, 13 Mar 2012 12:41:24 +0000 (-0400) Subject: Add `chanlist_len` to `comedi_get_cmd_generic_timed()` calls in Python demos. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4b56f24232844066dcdc62d349f565d6530e6ada;p=comedilib.git 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. --- 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)