From 3d79204427bfc1725d8184d6467e0a96ec4dfa89 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Tue, 13 Mar 2012 09:17:08 -0400 Subject: [PATCH] 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' --- demo/python/mmap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.26.2