Vеrsette
Explore posts from servers✅ String search by user text input algorithm
Sometimes the simplest solutions are the best, I don't know how I didn't think of that but yes, why do I even need "fuzzy" search and I can just use
Contains
and keep the same order. Thank you all, solved <a:PI_HeartScribble:703853250264301609>10 replies
❔ ✅ Trying to understand HID device response data
Are you still getting the same data output from it?
I have had an issue with there being different paths available for opening the same device after enumerating it
And only one of those paths is the right one (at least in the case of my mouse)
57 replies
❔ ✅ Trying to understand HID device response data
For testing, I'm using https://github.com/mikeobrien/HidLibrary (that's why the function names are different, I had some issues with my hidapi wrapper that I am too lazy to fix for now), but I will switch back to hidapi after I get everything working and port to Avalonia UI for cross platform compatibility
57 replies
❔ ✅ Trying to understand HID device response data
I'm really sorry for not answering earlier, I didn't get a notification of your message...
I sort of reverse engineered the original program, to be able to understand how it works and requests/sends data to and from the mouse.
I found that the original program was using a pretty common HID library for communication, https://github.com/libusb/hidapi, and that the command and response byte arrays always were 65 bytes long (requirement of the mouse, I think).
First I send the command with
hid_send_feature_report
, then I wait 70ms for the mouse to process everything and prepare a response (it's possible to use a lower value, but I found that it works best with about 70ms), and then I get the answer with hid_get_feature_report
57 replies