[haiku-development] Re: Meaning of HID Items min/max usage

  • From: Enrique Medina Gremaldos <quiqueiii@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sat, 28 Aug 2021 20:05:37 +0200


It looks like you know more about this than I do, now.


I really appreciate that, but I am still far from mastering the usb hid
specification.  Also, I don't have a deep understanding of Haiku HID stack.
I don't have enough self confidence to propose API changes :S

Anyway, as soon as I get the patch, we can discuss it on gerrit.

PS:
I've found an uninitialized array key press status on the keyboard handler.
It may render some weird effects but I haven't found any ticket related to
that, however I've seen people reporting some key press bugs on telegram.

Enrique M.G.

El sáb, 28 ago 2021 a las 10:30, Adrien Destugues (<pulkomandy@xxxxxxxxx>)
escribió:


I have more or less clear how to fix that (not a usb guru!) but I have
to
make some api changes, and this part I wanted to hear your opinion.

Why does HIDReportItem expose a UsageMinimum and UsageMaximum? Despite
this
not making sense anymore, wouldn't these properties fit better on
HIDCollection? An item is expected to have just its Usage ID. Perhaps I
am
missing something.

My proposal is to get rid of these methods on Items and move elsewhere
(collection?). As no longer would be a single min/max pair, this should
be
expressed as an usage array or range array.

It looks like you know more about this than I do, now. In that ticket we
have confirmed that the existing code is incorrect and does not handle this
case. Do the changes you think are needed, and we'll try to test it on
various usb-hid devices and see how it does. That's the best way to be sure
we're doing the right thing :)

--
Adrien / PulkoMandy



Other related posts: