[FIX] hw_drivers: detect Magtek card reader as a barcode reader
It behaves exactly the same as a barcode reader, and pos_mercury uses the barcode nomenclature to make it work. For reference, the full name is: Mag-Tek - USB Swipe Reader opw-2122553 X-original-commit: 635f1ea8527f4489b8c56b5d18856c7d2c60737e
This commit is contained in:
@@ -51,7 +51,8 @@ class KeyboardUSBDriver(Driver):
|
||||
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() or self.dev.interface_protocol == '0':
|
||||
device_name = self._device_name.lower()
|
||||
if 'barcode' in device_name or 'scanner' in device_name or 'reader' in device_name or self.dev.interface_protocol == '0':
|
||||
self._device_type = 'scanner'
|
||||
self._barcodes = Queue()
|
||||
self._current_barcode = ''
|
||||
|
||||
Reference in New Issue
Block a user