Generic Devices are a great addition to the feature set. I used to use MacDial to monitor events of my SurfaceDial knob (a neat piece of hardware). From my experience hacking MacDial, I know that if I turn the knob right, it reports the same state for every "click" (a rotation of "n" degrees). Unfortunately, BTT only reports a single event, no matter how far right I turn the knob. Could you make that optional? That would make rotary knobs like the SurfaceDial actually useful for macOS.
In 4.005 you can now just call bttGetNextEvenWithoutChange(targetDevice, reportID)
from your analyzer function, then it will get the next report even if there hasn't been a change in the data itself.
The Dial actually has some other nice features, like haptic feedback and configurable sensitivity. I might try using the executeBTTCommand feature to enable those at some point.
Thanks for sharing! Things like the Surface Dial are exactly the type of device I thought about when adding this generic device functionality. It's pretty nice being able to revive a small device with a few lines of code.
Hi! did you ever get "button" working correctly? It seems to fire twice for me (e.g. I have it mapped to "play/pause" and pressing down and releasing causes media to play and then immediately pause again.
If the button is being pressed while the wheel is still being turned, you'll want to act on both and you'll also want to be sure to call bttGetNextEvenWithoutChange() as you want to keep being notified about the wheel. So using if .. else ... else ... is generally a bad idea for buttons which aren't mutually exclusive, as multiple things could be happening at the same time and events would get lost.
Just replying to thank all involved in this thread. I don't need the Mac Dial app anymore and am now able to create my own dial workflow. Right now I have only one trigger for a turn of the wheel, but I'm going to try and create something that does this: