Hi Ico,
Thanks for the tip!
I was able to get [disis_wiimote] compiled and working after:
- Changing the #include not to assume extended (cuz I run vanilla)
- Adding -fPIC to the LINUXCFLAGS because I'm running 64-bit.
I haven't yet tried Roman's suggestion debian-sid flavor of [wiimote] with Pd, but will try to in the next few days.
One difference between the two -- [disis_wiimote] seems to use bang/metro based polling, but [wiimote] does not. Does [wiimote] just do the polling internally?
Yep, whenever cwiid sends its info to it which often breaks the Pd GUI since that message can arrive in the middle of updating gui queue, effectively crashing the gui (even though the engine continues to run, no further updates are possible to the tcl/tk gui), hence the original wiimote implementation (at least last time I checked it) is in this respect buggy. Likewise (again, last time I checked) it does not have threaded design as disis_wiimote has, which means any time you send rumble command or change LED command via the wiimote object, it will result in an xrun (at least it does on lower powered machines like netbooks).
Given that wiimote cannot send updates more than approx. 40 times a second, overburdening your patch with as-fast-as-possible output seems unnecessary, hence the metro implementation. In addition, disis_wiimote also outputs button data only when it actually changes to minimize redundant computation downstream. It also gives you a dedicated output for connection which can be conveniently used to automate things upon connection.
Hope this helps!