Questions (#2) - Button mappings on plugins (#112) - Message List
I am working on a project where the wiimote stands in a place near a LED board and the user reflects the IR back to the wiimote. That way you can track the user's finger movements.
My problem is that I am trying to implement some sort of pinching movement to be interpreted as a mouse-click. I have been trying to do this editing the IR-plugin that comes with wminput. As far as I have understood the code, it seems that I have to set active some bit (maybe bit 7) in the data.buttons structure. I have done this but it doesn't seem to work. Am I going the wrong way?
I don't think I have understood how the "virtual buttons" (http://abstrakraft.org/cwiid/wiki/Plugins) of plugins work with the rest of the code yet. I will be glad to follow any suggestion.
I am not sure if I made myself clear. My code goes like this:
if (IR source disappears for a brief time and reappears in the same place)
As the IR Plugin already maps button A to mouse left click, I wanted to reuse this code and just set the data.buttons[BTN_A] = 1, so that the main code of wminput does the rest. And this is exactly what is not working.pastor11/18/08 16:55:32 (5 years ago)
The virtual buttons are just boolean values in a bitfield that you set to true (1) when the virtual button is pressed, and false (0) when it isn't.
Are you resetting the the button after setting it? If not, this will be read as holding the button down.dsmith11/21/08 15:07:56 (5 years ago)