Wheel-functionality for EventClient
#1
Hi,

I have these two wheels that give 24 pulses for each rotation. I would like them to control volume and position respectively.

How would you do that with the current EventClient API?

Currently I'm sending a button press + button release event for each pulse, with a volumeplus or volumeminus command depending on direction. But the volume does not change at the speed I want, so I would like to raise/lower it faster. I could do that by sending multiple events, but it does not seem right. Also, if the user is rotating the wheel really fast I might get multiple pulses for reading, and thus would have to send even more events.

I've been looking at the "amount" parameter of SendButton, but I'm not sure how to use it. I've used the BTN_USE_AMOUNT and experimented with different values for amount, but the speed stays the same.
Reply
#2
The best way is probably to make it an axis, an analog axis.

WiiRemote does this on the nunchuck so you can check those sources for inspiration.

Cheers,
Tobias
If you have problems please read this before posting

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

Image

"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."
Reply

Logout Mark Read Team Forum Stats Members Help
Wheel-functionality for EventClient0