mcallegari / qlcplus

Q Light Controller Plus (QLC+) is a free and cross-platform software to control DMX or analog lighting systems like moving heads, dimmers, scanners etc. This project is a fork of the great QLC project written by Heikki Junnila that aims to continue the QLC development and to introduce new features.
Apache License 2.0
918 stars 349 forks source link

Proposal of a rework of HID device names #1571

Closed qfulmina closed 1 month ago

qfulmina commented 1 month ago

Hi,

this is a proposal for a more detailed and more robust naming of HID devices.

It covers:

  1. HIDDMXDevices always have a serial number, thus it is appended in parenthesis to be able to distinguish several connected devices.
  2. Those HIDJSDevices that expose a serial number append it in parenthesis as well.
  3. HIDJSDevices not exposing any product or manufacturer name use VID:PID as a naming scheme instead. (Previously those had a completely empty name.)

I'm open to changes of course.

coveralls commented 1 month ago

Coverage Status

coverage: 32.007%. remained the same when pulling 48ad1bab4033e5c301f921ab8dec93bea3d0bd89 on qfulmina:dev-add-hid-device-serial-number into bfa4d2dd4a0b5e5dfbb195a654b9b73c499a8253 on mcallegari:master.

mcallegari commented 1 month ago

Unfortunately I cannot test this because I have just one joypad which present itself like this on Linux:

[  803.360747] usb 1-4: new low-speed USB device number 4 using xhci_hcd
[  803.497526] usb 1-4: New USB device found, idVendor=0c12, idProduct=0005, bcdDevice= 0.01
[  803.497550] usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  803.497558] usb 1-4: Product: PS Vibration Feedback Converter 
[  803.497565] usb 1-4: Manufacturer: Zeroplus
[  803.559790] usbcore: registered new interface driver usbhid
[  803.559800] usbhid: USB HID core driver
[  803.590312] input: Zeroplus PS Vibration Feedback Converter  as /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.0/0003:0C12:0005.0002/input/input25
[  803.590574] zeroplus 0003:0C12:0005.0002: input,hidraw1: USB HID v1.10 Joystick [Zeroplus PS Vibration Feedback Converter ] on usb-0000:00:14.0-4/input0
[  803.590635] zeroplus 0003:0C12:0005.0002: force feedback for Zeroplus based devices by Anssi Hannula <anssi.hannula@gmail.com>

Would you mind sharing a screenshot showing how your change looks like in the I/O tab? Thanks

qfulmina commented 1 month ago

Sure:

https://forum.qlcplus.org/download/file.php?id=13665

Sorry for the bad crop (missing the first letter and the closing brace on the second line). Right now I don't have those devices around. I hope you get an idea. (I can prepare another screenshot once I get back to the devices.)

First one didn't tell any name thus showing vendor ID and product ID. The second did expose a name. And a serial number: AZ-RB- ... .

mcallegari commented 1 month ago

For devices with no name/vendor I would give them a generic name like "HID Input device (VID:PID)" with VID/PID toUpper()

qfulmina commented 1 month ago

Alright, will rework that.

qfulmina commented 1 month ago

Changed it accordingly and it looks great:

hid-device-names

mcallegari commented 1 month ago

Thank you very much. Pretty helpful! :+1: