projects
/
minwii.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Affichage du HID dans l'application d'analyse des logs.
[minwii.git]
/
src
/
pywiiuse
/
pygame_wiimouse.py
diff --git
a/src/pywiiuse/pygame_wiimouse.py
b/src/pywiiuse/pygame_wiimouse.py
index
55a9c99
..
f77856c
100755
(executable)
--- a/
src/pywiiuse/pygame_wiimouse.py
+++ b/
src/pywiiuse/pygame_wiimouse.py
@@
-127,18
+127,26
@@
class wiimote_thread(Thread):
WT = None
WT = None
-def init(nmotes, timeout, screenResolution=(660, 370)):
+def init(nmotes, timeout, screenResolution=(660, 370)
, position='ABOVE'
):
'''Initialize the module.'''
global WT
if WT:
return
WT = wiimote_thread(nmotes, timeout)
'''Initialize the module.'''
global WT
if WT:
return
WT = wiimote_thread(nmotes, timeout)
+ if position == 'ABOVE' :
+ position = wiiuse.IR_ABOVE
+ elif position == 'BELOW' :
+ position = wiiuse.IR_BELOW
+ else :
+ position = wiiuse.IR_ABOVE
+
+
nmotes = get_count()
for i in range(nmotes) :
wm = Wiimote(i) # access the wiimote object
wm.enable_accels(0) # turn off acceleration reporting
nmotes = get_count()
for i in range(nmotes) :
wm = Wiimote(i) # access the wiimote object
wm.enable_accels(0) # turn off acceleration reporting
- wm.enable_ir(1, vres = screenResolution, position=
wiiuse.IR_ABOVE
)
+ wm.enable_ir(1, vres = screenResolution, position=
position
)
def get_count():
def get_count():