]> sigrok.org Git - libsigrok.git/commitdiff
dcttech-usbrelay: accept conn= spec different from hidapi enum details
authorGerhard Sittig <redacted>
Thu, 22 Jul 2021 06:03:11 +0000 (08:03 +0200)
committerGerhard Sittig <redacted>
Fri, 23 Jul 2021 17:58:46 +0000 (19:58 +0200)
Rework the scan and probe routines. Skip the USB enumeration's result
set when the user provided a conn= spec, instead exclusively open the
specified device. It's acceptable when this user spec does not match
the details which the hidapi enumeration would yield. [ This version
prepares but does not implement yet support for "funny" hidapi(3) paths
on platforms beyond Linux. ]

This also weakens the logic which determines the relay count from the
USB product string. Any trailing number is accepted. Which allows to use
compatible devices with differing vendor/product strings when conn= is
specified. The previous "USBRelay" prefix check remains in place for
automatic enumeration.

Beautify diagnostics, even phrase debug and spew level messages such
that they can be presented to users. Makes -l 5 look more consistent.


No differences found