projects
/
comedilib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8add63f
)
Cast the period to an integer in `demo/python/mmap.py`'s command setup.
author
W. Trevor King
<wking@drexel.edu>
Tue, 13 Mar 2012 13:17:08 +0000
(09:17 -0400)
committer
W. Trevor King
<wking@drexel.edu>
Tue, 13 Mar 2012 13:17:08 +0000
(09:17 -0400)
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
patch
|
blob
|
history
diff --git
a/demo/python/mmap.py
b/demo/python/mmap.py
index ebab9d780b61d67272cff6c93c46a8ab839d2fa7..98abf147ddb5fd51edfa6c431af1dcec6be9ba93 100755
(executable)
--- 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