X-Git-Url: https://scm.cri.mines-paristech.fr/git/minwii.git/blobdiff_plain/f930cbccef5ed34b7b17b9e738458b048d93d1da..9096acac0bf12c658183483be6dc898db1a31756:/src/pywiiuse/pygame_wiimouse.py diff --git a/src/pywiiuse/pygame_wiimouse.py b/src/pywiiuse/pygame_wiimouse.py index 8a4f6e0..4d42763 100755 --- a/src/pywiiuse/pygame_wiimouse.py +++ b/src/pywiiuse/pygame_wiimouse.py @@ -60,7 +60,6 @@ class wiimote_thread(Thread): func, args = self.queue.get_nowait() except Empty: break - print 'do:', func.__name__, args func(*args) def pause(self) : @@ -122,6 +121,10 @@ class wiimote_thread(Thread): wiiuse.disconnect(self.wiimotes[i]) self.go = False + def get_count(self): + return self.actual_nmotes + + WT = None def init(nmotes, timeout, screenResolution=(660, 370)): @@ -140,7 +143,7 @@ def init(nmotes, timeout, screenResolution=(660, 370)): def get_count(): '''How many Wiimotes were found?''' - return WT.actual_nmotes + return WT.get_count() def quit(): '''Gracefully shutdown the connection and turn off the wiimote leds''' @@ -192,7 +195,6 @@ class wiimote(object): enable |= wiiuse.ORIENT_THRESH else: disable |= wiiuse.ORIENT_THRESH - print enable, disable WT.do(wiiuse.set_flags, self.wm, enable, disable) def set_orient_thresh(self, thresh):