OSVR / OSVR-Vive

OSVR driver for use with the HTC Vive (including Vive PRE)
Apache License 2.0
62 stars 19 forks source link

Trigger Button is reported as Trackpad Click Button #22

Closed pstelzer closed 7 years ago

pstelzer commented 7 years ago

While testing the callbacks for the buttons on the controller I noticed that I'm receiving a callback for the Trackpad Click Button instead of the Trigger Button when I press the Trigger. The handling on my side seems to be correct at a first glance. But I found that in OSVRViveTracker.cpp the ID offset for the Trigger Button is the same as for the Trackpad Click Button:

static const auto TRACKPAD_CLICK_BUTTON_OFFSET = 4;
static const auto TRIGGER_BUTTON_OFFSET = 4;

I'm not absolutely sure if that's an error, but it would explain my issue.

pstelzer commented 7 years ago

Fixing the offset resolved the issue. I've created a pull request for it.

rpavlik commented 7 years ago

thank you!