Add `chanlist_len` to `comedi_get_cmd_generic_timed()` calls in Python demos.
authorW. Trevor King <wking@drexel.edu>
Tue, 13 Mar 2012 12:41:24 +0000 (08:41 -0400)
committerW. Trevor King <wking@drexel.edu>
Tue, 13 Mar 2012 12:41:24 +0000 (08:41 -0400)
This catches the Python demos up to:

  commit 003b9ec501b5c69f25bfbc68e8b3f923d482bb04
  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.

demo/python/cmd.py
demo/python/info.py

index b970ef0016a57d6972609de94daa9227707e703f..11994b0c93bc1021907bbe40af9a210d825a5e39 100755 (executable)
@@ -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
index fa26c06e3c43ac0232d6afaaecdf632cbe345b6a..15393e057df8777a22fbc538a287bc20aa119675 100755 (executable)
@@ -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)