Cast the period to an integer in demo/python/cmd.py
's command setup.
This avoids: TypeError: in method 'comedi_get_cmd_generic_timed', argument 5 of type 'unsigned int'
This commit is contained in:
parent
fe3cdd466b
commit
7a277ab0cb
1 changed files with 2 additions and 1 deletions
|
@ -86,7 +86,8 @@ def dump_cmd(cmd):
|
|||
#construct a comedi command
|
||||
cmd = c.comedi_cmd_struct()
|
||||
|
||||
ret = c.comedi_get_cmd_generic_timed(dev,subdevice,cmd,nchans,1.0e9/freq)
|
||||
period = int(1.0e9/freq) # in nanoseconds
|
||||
ret = c.comedi_get_cmd_generic_timed(dev,subdevice,cmd,nchans,period)
|
||||
if ret: raise "Error comedi_get_cmd_generic failed"
|
||||
|
||||
cmd.chanlist = mylist # adjust for our particular context
|
||||
|
|
Loading…
Add table
Reference in a new issue