From: W. Trevor King Date: Tue, 13 Mar 2012 13:17:08 +0000 (-0400) Subject: Cast the period to an integer in `demo/python/mmap.py`'s command setup. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3d79204427bfc1725d8184d6467e0a96ec4dfa89;p=comedilib.git Cast the period to an integer in `demo/python/mmap.py`'s command setup. This avoids: Traceback (most recent call last): ... File ".../mmap.py", line 96, in prepare_cmd C.scan_begin_arg = 1e9/freq ... TypeError: in method 'comedi_cmd_struct_scan_begin_arg_set', argument 2 of type 'unsigned int' --- diff --git a/demo/python/mmap.py b/demo/python/mmap.py index ebab9d7..98abf14 100755 --- a/demo/python/mmap.py +++ b/demo/python/mmap.py @@ -93,7 +93,7 @@ def prepare_cmd(dev, subdev, C): C.start_src = c.TRIG_NOW C.start_arg = 0 C.scan_begin_src = c.TRIG_TIMER - C.scan_begin_arg = 1e9/freq + C.scan_begin_arg = int(1e9/freq) C.convert_src = c.TRIG_TIMER C.convert_arg = 1 C.scan_end_src = c.TRIG_COUNT