Acapulco
February 2nd, 2008, 05:04 AM
Hi. I'm new to this forums and I was hoping someone could help me with WMD and Ubuntu 7.10, as I can't find any other place more suitable for this question.
I've managed to get a successful connection to my Wiimote using WMD.py, although I get the following error:
acapulco@LaOla:~/wmd/wmd-0.1.2$ sudo python WMD.py
Registering key BTN_RIGHT for button A with code 111
Registering key BTN_LEFT for button B with code 110
Registering key ['KEY_LEFTCTRL', 'KEY_LEFTALT', 'BTN_LEFT'] for button D with code 1d
Registering key ['KEY_LEFTCTRL', 'KEY_LEFTALT', 'BTN_LEFT'] for button D with code 38
Registering key ['KEY_LEFTCTRL', 'KEY_LEFTALT', 'BTN_LEFT'] for button D with code 110
Registering key ['KEY_LEFTALT'] for button L with code 38
Registering key KEY_1 for button 1 with code 2
Registering key KEY_2 for button 2 with code 3
Registering key ['KEY_LEFTCTRL'] for button U with code 1d
Registering key ['KEY_F8'] for button R with code 42
[[1074025828, 2], [1074025830, 0], [1074025830, 1], [1074025828, 1], [1074025828, 0], [1074025829, 273], [1074025829, 272], [1074025829, 29], [1074025829, 56], [1074025829, 272], [1074025829, 56], [1074025829, 2], [1074025829, 3], [1074025829, 29], [1074025829, 66]]
CONNECTING
Looking for Wiimote services at address 00:19:1D:62:60:E9
Victory! We have found that Wiimote!
We are now connected to Wiimote at address 00:19:1D:62:60:E9
CONNECTED
Traceback (most recent call last):
File "WMD.py", line 45, in <module>
wmd = WMD()
File "WMD.py", line 41, in __init__
cycles = wm.main_loop()
File "/home/acapulco/wmd/wmd-0.1.2/wmd/Wiimote/WMManager.py", line 42, in main_loop
self.parser.parse( data )
File "/home/acapulco/wmd/wmd-0.1.2/wmd/Wiimote/Input.py", line 102, in parse
self.split_report( report, type )
File "/home/acapulco/wmd/wmd-0.1.2/wmd/Wiimote/Input.py", line 119, in split_report
func( slice )
File "/home/acapulco/wmd/wmd-0.1.2/wmd/Wiimote/Input.py", line 155, in slice_STAT
self.process_stats( s )
TypeError: process_stats() takes exactly 1 argument (2 given)
The reason I want to use WMD and not some other solution is because I want to do some Python learning, so I opened up the source file, found the line and found nothing wrong:
This is the offending function:
def slice_STAT( self, slice ):
stat = bf( decbyte( slice ) )
s = {}
s['attachment'] = stat[1]
s['continuous'] = stat[3]
s['leds'] = stat[4:8]
self.process_stats( s )
Calling:
def process_stats( s ):
pass
I'm no Python Guru, but if those are the only two entries found for "process_stats" I really can't see what could be wrong. I even get the GUI to show for a couple of seconds before this error arises.
I appreciate any help and time provided
Acapulco
I've managed to get a successful connection to my Wiimote using WMD.py, although I get the following error:
acapulco@LaOla:~/wmd/wmd-0.1.2$ sudo python WMD.py
Registering key BTN_RIGHT for button A with code 111
Registering key BTN_LEFT for button B with code 110
Registering key ['KEY_LEFTCTRL', 'KEY_LEFTALT', 'BTN_LEFT'] for button D with code 1d
Registering key ['KEY_LEFTCTRL', 'KEY_LEFTALT', 'BTN_LEFT'] for button D with code 38
Registering key ['KEY_LEFTCTRL', 'KEY_LEFTALT', 'BTN_LEFT'] for button D with code 110
Registering key ['KEY_LEFTALT'] for button L with code 38
Registering key KEY_1 for button 1 with code 2
Registering key KEY_2 for button 2 with code 3
Registering key ['KEY_LEFTCTRL'] for button U with code 1d
Registering key ['KEY_F8'] for button R with code 42
[[1074025828, 2], [1074025830, 0], [1074025830, 1], [1074025828, 1], [1074025828, 0], [1074025829, 273], [1074025829, 272], [1074025829, 29], [1074025829, 56], [1074025829, 272], [1074025829, 56], [1074025829, 2], [1074025829, 3], [1074025829, 29], [1074025829, 66]]
CONNECTING
Looking for Wiimote services at address 00:19:1D:62:60:E9
Victory! We have found that Wiimote!
We are now connected to Wiimote at address 00:19:1D:62:60:E9
CONNECTED
Traceback (most recent call last):
File "WMD.py", line 45, in <module>
wmd = WMD()
File "WMD.py", line 41, in __init__
cycles = wm.main_loop()
File "/home/acapulco/wmd/wmd-0.1.2/wmd/Wiimote/WMManager.py", line 42, in main_loop
self.parser.parse( data )
File "/home/acapulco/wmd/wmd-0.1.2/wmd/Wiimote/Input.py", line 102, in parse
self.split_report( report, type )
File "/home/acapulco/wmd/wmd-0.1.2/wmd/Wiimote/Input.py", line 119, in split_report
func( slice )
File "/home/acapulco/wmd/wmd-0.1.2/wmd/Wiimote/Input.py", line 155, in slice_STAT
self.process_stats( s )
TypeError: process_stats() takes exactly 1 argument (2 given)
The reason I want to use WMD and not some other solution is because I want to do some Python learning, so I opened up the source file, found the line and found nothing wrong:
This is the offending function:
def slice_STAT( self, slice ):
stat = bf( decbyte( slice ) )
s = {}
s['attachment'] = stat[1]
s['continuous'] = stat[3]
s['leds'] = stat[4:8]
self.process_stats( s )
Calling:
def process_stats( s ):
pass
I'm no Python Guru, but if those are the only two entries found for "process_stats" I really can't see what could be wrong. I even get the GUI to show for a couple of seconds before this error arises.
I appreciate any help and time provided
Acapulco