Add chanlist_len to comedi_get_cmd_generic_timed() calls in Python demos.

This catches the Python demos up to:

  commit 003b9ec501
  Author: Ian Abbott <abbotti@mev.co.uk>
  Date:   Mon Nov 8 11:01:42 2010 +0000

    Add chanlist_len parameter to comedi_get_cmd_generic_timed.
This commit is contained in:
W. Trevor King 2012-03-13 08:41:24 -04:00
parent 70eca90662
commit 4b56f24232
2 changed files with 2 additions and 2 deletions

View file

@ -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

View file

@ -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)