microsoft / hidtools

Human Interface Device (HID) Tools for Windows and Devices
MIT License
146 stars 20 forks source link

Units encoding #9

Closed bjanders closed 1 year ago

bjanders commented 1 year ago

I'm very sorry to spam this project with my question, but I could not find any pointer on the usb.org site where questions like these can be asked or any recommended forum where it can be discussed. I couldn't find any contact information on usb.org. My issue is that the HID specification v1.11 pages 36 - 38 is very vague, or even incomplete, in how units are actually encoded.

This 10 year old post sums it up pretty well: https://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/e87d0db1-486e-42ae-bf95-d1ac5ffc0b02/unit-exponent-item-value-encoding-in-hid-report-descriptors

To make this question more related to this project: What did the Waratah tool developers use as a reference on how units are actually encoded? Is there any better and clearer document than HID v1.11 pages 36-38?

I think usb.org should make a new release of the specification, where the encoding is clarified.

bjanders commented 1 year ago

I think I figured it out after thoroughly reading it 5 times. I still think that section of the specs could be written much more clearly. usb.org should also have a way to provide feedback and some way to report errors from non-member and/or a forum for public discussion.

matwilli commented 1 year ago

Thanks @bjanders , I appreciate the feedback (I'm the HID-WG Chairman). I agree the existing HID specification for Units at first (second/third...) glance is confusing, and the examples in the documentation aren't very clear. Unfortunately, the document is in a closed-state, which requires additional approvals from the USB-IF leadership. There are several other things in the spec that I would also like to clear-up, but given the (internal) logistical effort, I'm continuing to delay revising until the need is overwhelming.

There is documentation in the Wiki that gives Unit composition examples and pre-defined Units, which I does a better job of illustrating units.