File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# nxt.usbsock module -- USB socket communication with LEGO Minstorms NXT
22# Copyright (C) 2006, 2007 Douglas P Lau
33# Copyright (C) 2009 Marcus Wanner
4+ # Copyright (C) 2011 Paul Hollensen, Marcus Wanner
45#
56# This program is free software: you can redistribute it and/or modify
67# it under the terms of the GNU General Public License as published by
1213# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1314# GNU General Public License for more details.
1415
15- import usb
16+ import usb , os
1617from nxt .brick import Brick
1718
1819ID_VENDOR_LEGO = 0x0694
@@ -43,7 +44,8 @@ def connect(self):
4344 self .handle = self .device .open ()
4445 self .handle .setConfiguration (1 )
4546 self .handle .claimInterface (0 )
46- self .handle .reset ()
47+ if os .name != 'nt' : # http://code.google.com/p/nxt-python/issues/detail?id=33
48+ self .handle .reset ()
4749 if self .debug :
4850 print 'Connected.'
4951 return Brick (self )
You can’t perform that action at this time.
0 commit comments