Skip to content
Permalink
Browse files

[IMP] iot: Add support for scanner without protocol

X-original-commit: 98f4814
  • Loading branch information...
qle-odoo authored and fw-bot committed Nov 8, 2019
1 parent 931da03 commit 6a368f9ab77b7f9ecdda422eb6a312ca725b465d
Showing with 3 additions and 2 deletions.
  1. +3 −2 addons/hw_drivers/drivers/KeyboardUSBDriver.py
@@ -51,7 +51,7 @@ def __init__(self, device):
if (self.dev.idVendor == device.info.vendor) and (self.dev.idProduct == device.info.product):
self.input_device = device

if 'barcode' in self._device_name.lower() or 'scanner' in self._device_name.lower():
if 'barcode' in self._device_name.lower() or 'scanner' in self._device_name.lower() or self.interface_protocol == '0':
self._device_type = 'scanner'
self._barcodes = Queue()
self._current_barcode = ''
@@ -62,7 +62,8 @@ def __init__(self, device):
def supported(cls, device):
for cfg in device:
for itf in cfg:
if itf.bInterfaceClass == 3 and itf.bInterfaceProtocol == 1:
if itf.bInterfaceClass == 3 and itf.bInterfaceProtocol != 2:
device.interface_protocol = itf.bInterfaceProtocol
return True
return False

0 comments on commit 6a368f9

Please sign in to comment.
You can’t perform that action at this time.