PDA

View Full Version : [PATCH] Wii Remote (Wiimote) support for XBMC Linux port


topfs2
2008-01-20, 17:53
I've just submitted a patch that allows XBMC to natively use the Wiiremote.

This should work with both the older CWIID lib that is in the repos of the ubuntu gutsy and the newer that is in the svn.

http://sourceforge.net/tracker/index.php?func=detail&aid=1875817&group_id=87054&atid=581840

As for now it doesn't support the nunchuck or classic controller but everything else.

The Keydata.xml that I send with the patch isn't perfected and I'll try to make a new and better one as soon as possible and send that one too. but the one supplied does enough job to atleast more than try the wiiremote.

topfs2
2008-01-21, 09:47
Oh i forgot to say how to connect to the wiiremote.
When compiled it's as easy as just putting the wiiremote into discoverable mode by pressing 1 + 2. (Just don't have the Wii on while doing this because then it will connect to it instead...)
When you feel done with the wiiremote just press and hold the power button and it will disconnect. If you ever feel the urge too connect again just put it in discovery mode again (1 + 2). Good way to save battery.

topfs2
2008-01-21, 11:58
Seems to be some bugs in the source I sent how do I go about with corrections on these? should I just post them with lines as a comment or should I Send a new PATCH in the tracker?

Sry for this. I'm using g++ and gedit and I seems to have missed some typos. As with line 34 in Wiiremote.cpp it should ofc be CWiiremote:: and not CWiidremote::

Terribly sorry. Also I've updated and got a much better keydata.xml file now. Should I update it to as a standalone patch?

Gamester17
2008-01-21, 14:27
Seems to be some bugs in the source I sent how do I go about with corrections on these? should I just post them with lines as a comment or should I Send a new PATCH in the tracker?As long as a patch has not been implemented then just replace that diff with a new one (maybe just add "v2" to the filename though for reference). If and when a patch gets implemented into the SVN then you need to submit a new patch to the tracker as the old one will be closed, this is to making tracking and implementation simpler.

If the new keydata.xml is releated to and dependent on this patch (or vide versa) then please add it to the existing tracker post, if however if work as a standalone patch then please submit it as a new patch, thanks.

Gamester17
2008-01-21, 14:58
...oh, I now see that you where not logged-in when you submitted the patch. You have to be logged-in to SourceForge in order to edit a patch, so this time you can not update the patch to the existing tracker post, you will instead have to submit a new one.

Next time please making sure that you are always logged-in :grin:

topfs2
2008-01-21, 15:07
Hehe, yeah i forgot to log in. But you can close it and I'll submit a new patch when I come home. WHILE being loged in :)

First time i've submited a patch so I didn't think of it :)

Thanks

topfs2
2008-01-21, 18:32
I've uploaded the newer version as a new tracker. This time logged on :)

If I Upload a new file on this tracker is it common courtesy to leave the "old" one still at the tracker or should I delete it? Maybe it depends on the changes and I should use common sense :)

http://sourceforge.net/tracker/index.php?func=detail&aid=1876587&group_id=87054&atid=581840

This time I've installed the older version on my main comp but it should still compile against the newer one if you just undef CWIID_OLD

topfs2
2008-01-24, 20:04
Quote : Nobody
"How well is the source code documented?
http://www.doxygen.org

Also, how would this work for Mac OS X?"

The code isn't doxygen because I haven't used it before, although I could look into this. I've tried to document the code as much as possible. I can update this to some further if there's to much unclear steps.

This won't work on Mac OS X. I have although kept ALL O/S specific code in CWiiremote so that the code could easily be made to work on Mac OS X, I'll look into this when the xbmc-osx is mature enough.

The reason why I didn't used a cross-platform wiiremote lib is because I couldn't find one that is good enough, and easy enough to install on linux.

d4rk
2008-01-24, 20:55
Topfs2, thanks for the patch, please see my comments on sf.

topfs2
2008-01-27, 14:21
The patch is commited, thx D4rk.

I'd love feature suggestions and bugreports
howto install is posted here (http://xbmc.org/forum/showthread.php?p=165970#post165970)

topfs2
2008-02-01, 15:03
Found 2 bugs when the user have disabled the IR tracking.

Submited a new patch and I explain the issues there.
http://sourceforge.net/tracker/index.php?func=detail&aid=1884388&group_id=87054&atid=581840

topfs2
2008-02-02, 01:52
Woops, just noted that I accidently did put an extra'p' in the code :)
Submited a patch

d4rk
2008-02-02, 02:00
Woops, just noted that I accidently did put an extra'p' in the code :)
Submited a patch

While testing I had Wii remote support disabled, no wonder it compiled fine :) . Thanks!