Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes issue #900 KC_PWR not working #963

Merged
merged 1 commit into from
Dec 19, 2016
Merged

Conversation

wilba
Copy link
Contributor

@wilba wilba commented Dec 19, 2016

This fixes #900 which was broken with the fix for #522.

I've limited the "usage" range to the only three "usage" codes in the source. The data being sent needs to be a 1-based index to the "array" of states, hence the "logical" min/max of 1..3.

Well, that's how I'm interpreting the HID spec: http://www.usb.org/developers/hidpage/HID1_11.pdf page 32:

The value returned by an Array item is an index so it is recommended that:

  1. An Array field returns a 0 value when no controls in the array are asserted.
  2. The Logical Minimum equals 1.
  3. The Logical Maximum equal the number of elements in the array.

@jackhumbert
Copy link
Member

Awesome - good catch :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

KC_PWR not working
2 participants