OpenAcousticDevices / USB-HID-Tool

A command line tool for accessing USB HID devices.
MIT License
38 stars 11 forks source link

Wrong number of cmdline parms in example #4

Open takosalad opened 3 weeks ago

takosalad commented 3 weeks ago

The example contains 2 parms (vid+pid), then another 2 undocumented parms 0x00 0x01 and then 64 parameters. However, the text/code only speaks of 2 parms + 64.

Also, the 64 "payload" parameters don't have the 0x prefix, while the vid+pid have it. Is it an oversight? Because strtol() in the code is used with base 0, which means if the number doesn't start on 0x or 0X it will be interpreted to base 10 instead of 16, resulting in wrong data.