projects
/
comedilib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dbe3c77
)
demo/python/mmap.py: Fix buffer wraparound bug.
author
Ian Abbott
<abbotti@mev.co.uk>
Thu, 10 May 2012 12:49:57 +0000
(13:49 +0100)
committer
Ian Abbott
<abbotti@mev.co.uk>
Thu, 10 May 2012 12:49:57 +0000
(13:49 +0100)
Fix bug reported by Ross Williamson where the code does not deal with
buffer wraparound within a chunk of data.
demo/python/mmap.py
patch
|
blob
|
history
diff --git
a/demo/python/mmap.py
b/demo/python/mmap.py
index 65f9f82948dea2024ce9c674e2fbe07eacd13ea3..07652ba5ae4b8ec878b510de53bdad13ba81a0a7 100755
(executable)
--- a/
demo/python/mmap.py
+++ b/
demo/python/mmap.py
@@
-185,6
+185,8
@@
while flag:
map.seek(back%size)
for i in range(back,front,2):
DATA.fromstring(map.read(2))
+ if map.tell() == size:
+ map.seek(0)
DATA.tofile(of) # append data to log file
## time.sleep(.01)
ret = c.comedi_mark_buffer_read(dev, subdevice, front-back)