2014-05-15, 19:46
I have been using the PS3 controller as a remote controller for XBMC with qtsixad. and it works OK. but with limited features.
So I wanted to try the XBMC-way, with the ps3d.py event client. but I had an issue with constant rumbling. I search high and low for a solution, but all I found was that someone removed the rumble motors to solve the problem, but that wasn't really a good solution for me.
So I started looking trough the code (although I'm not a python programmer). and found where the rumbling is started, but did not figure how to not start it, So looked trough the qtsixad code and found how rumbling is started there, and added it to sixaxis.py in the xbmc source.
Since its more like a hack rather than a solution, I will not make a pull request, but I will share my code here if others have the same issue
And maybe some who understands this code can create a real fix.
add this after line 223 in tools/EventClients/lib/python/ps3/sixaxis.py
the ps3d.py is much more preferable than qtsixad, since I don't have to struggle with the key-mapping, and I can use the gyro as a mouse and disable it with the PS button is a nice feature.
So I wanted to try the XBMC-way, with the ps3d.py event client. but I had an issue with constant rumbling. I search high and low for a solution, but all I found was that someone removed the rumble motors to solve the problem, but that wasn't really a good solution for me.
So I started looking trough the code (although I'm not a python programmer). and found where the rumbling is started, but did not figure how to not start it, So looked trough the qtsixad code and found how rumbling is started there, and added it to sixaxis.py in the xbmc source.
Since its more like a hack rather than a solution, I will not make a pull request, but I will share my code here if others have the same issue
And maybe some who understands this code can create a real fix.
add this after line 223 in tools/EventClients/lib/python/ps3/sixaxis.py
Code:
bytes2 = [0x52, 0x1]
bytes2.extend([0x00, 0xff, 0x00, 0xff, 0x00])
bytes2.extend([0x00, 0x00, 0x00, 0x00, 0x02])
bytes2.extend([0xff, 0x27, 0x10, 0x00, 0x32])
bytes2.extend([0xff, 0x27, 0x10, 0x00, 0x32])
bytes2.extend([0xff, 0x27, 0x10, 0x00, 0x32])
bytes2.extend([0xff, 0x27, 0x10, 0x00, 0x32])
bytes2.extend([0x00, 0x00, 0x00, 0x00, 0x32])
control_sock.send(struct.pack("37B", *bytes2))
data = control_sock.recv(1)
the ps3d.py is much more preferable than qtsixad, since I don't have to struggle with the key-mapping, and I can use the gyro as a mouse and disable it with the PS button is a nice feature.