summaryrefslogtreecommitdiff
path: root/nxt-python-fantom/nxt/usbsock.py
diff options
context:
space:
mode:
authorTat-Chee Wan (USM)2011-05-04 08:17:53 +0800
committerTat-Chee Wan (USM)2011-05-04 08:17:53 +0800
commit05b196d6bf26b0fe70a43607269f88187f595673 (patch)
tree512e8d09ed1229ec51e4a7ecf9b112e437103979 /nxt-python-fantom/nxt/usbsock.py
parent5885fe8b81e99d6af1e51f7d7e3b20d0fee49676 (diff)
work in progress
Tracing Exception in NXTIterator.get_nxt() which is triggered when invoking fantomglue.find_devices()
Diffstat (limited to 'nxt-python-fantom/nxt/usbsock.py')
-rw-r--r--nxt-python-fantom/nxt/usbsock.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/nxt-python-fantom/nxt/usbsock.py b/nxt-python-fantom/nxt/usbsock.py
index 9df7792..aa766a8 100644
--- a/nxt-python-fantom/nxt/usbsock.py
+++ b/nxt-python-fantom/nxt/usbsock.py
@@ -12,6 +12,8 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
+USB_BUFSIZE = 64
+
try:
import fantomglue as usb
except ImportError:
@@ -55,7 +57,7 @@ class USBSock(object):
def recv(self):
'Use to recieve raw data over USB connection ***ADVANCED USERS ONLY***'
- data = self.sock.recv(64)
+ data = self.sock.recv(USB_BUFSIZE)
if self.debug:
print 'Recv:',
print ':'.join('%02x' % (c & 0xFF) for c in data)