uhid fixes
A few minor changes, the 'big' ones are:
-
UHIDDevice.destroy()
polls all changes off the fd. previously it would only take the first which in my case was a mysteriousopen
-
UHIDDevice.dispatch()
loops until no further events are available. This means our udev events are actually somewhat synchronised now -
UHIDDevice.destroy()
resets the internal device node/hidraw node list
There's a remaining issue in that the udev remove
event will come after destroy()
and not picked up until something else calls dispatch()
. Largely a cosmetic issue while we clean out everything during destroy()
anyway but it feels wrong.
I played with adding extra dispatch()
calls during destroy()
but that makes things worse since we don't know what other events we may be handling.