From: W. Trevor King Date: Tue, 13 Mar 2012 12:58:19 +0000 (-0400) Subject: Cast the period to an integer in `demo/python/cmd.py`'s command setup. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=7a277ab0cb12e7ad6b84f9973ba5c09bcbdeb1e4;p=comedilib.git 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' --- diff --git a/demo/python/cmd.py b/demo/python/cmd.py index 11994b0..46c1451 100755 --- a/demo/python/cmd.py +++ b/demo/python/cmd.py @@ -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