Added vendorId and productId

This commit is contained in:
Matthias Fulz 2022-07-03 01:35:02 +02:00
parent 67574e7276
commit d9849bb79c
1 changed files with 6 additions and 0 deletions

View File

@ -16,6 +16,8 @@ type QEncDevice struct {
path string
serial string
product string
productId uint16
vendorId uint16
manufacturer string
dev *hid.Device
bufSize uint8
@ -28,6 +30,8 @@ type QEncDevice struct {
func (d *QEncDevice) GetPath() string { return d.path }
func (d *QEncDevice) GetSerial() string { return d.serial }
func (d *QEncDevice) GetProduct() string { return d.product }
func (d *QEncDevice) GetProductId() uint16 { return d.productId }
func (d *QEncDevice) GetVendorId() uint16 { return d.vendorId }
func (d *QEncDevice) GetManufacturer() string { return d.manufacturer }
func (d *QEncDevice) GetBufSize() uint8 { return d.bufSize }
@ -200,6 +204,8 @@ func QEncScanDevices(ids ...uint16) (ret []*QEncDevice, err error) {
path: info.Path,
serial: info.SerialNbr,
product: info.ProductStr,
productId: info.ProductID,
vendorId: info.VendorID,
manufacturer: info.MfrStr,
timeout: 5,
retryTimeout: 10,