diff usb488.py @ 23:876d951bbcc0

Redo timeout in a more sensible way (also change it to 100ms)
author Daniel O'Connor <darius@dons.net.au>
date Thu, 11 Aug 2011 21:19:10 +0930
parents 5ff9130cc953
children ad5942d22f78
line wrap: on
line diff
--- a/usb488.py	Thu Aug 11 21:18:09 2011 +0930
+++ b/usb488.py	Thu Aug 11 21:19:10 2011 +0930
@@ -222,9 +222,12 @@
             if wrote != len(chunk):
                 raise "Short write, got %d, expected %d" % (wrote, len(chunk))
 
-    def read(self, timeout = 0.2):
+    def read(self, timeout = None):
         """Read data from the device, waits for up to timeout seconds for each USB transaction"""
 
+        if timeout == None:
+            timeout = 0.1
+            
         # Mangle into milliseconds
         _timeout = int(timeout * 1000.0)