From ad3dcd77116bb62d64906d4cb7e962a49d9fb9a8 Mon Sep 17 00:00:00 2001 From: Ale Vilar Date: Fri, 30 Aug 2024 23:00:13 +0000 Subject: [PATCH] chore: Update ComandosHandler.py to use hex values for USB driver parameters --- src/common/ComandosHandler.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/common/ComandosHandler.py b/src/common/ComandosHandler.py index ee862dcc23..24a0ea8d09 100644 --- a/src/common/ComandosHandler.py +++ b/src/common/ComandosHandler.py @@ -67,17 +67,26 @@ def runTraductor(jsonTicket, queue): # classprinter.Usb(idVendor=None, idProduct=None, usb_args={}, timeout=0, in_ep=130, out_ep=1, *args, **kwargs) # convertir de string a int if 'out_ep' in driverOps: - driverOps['out_ep'] = int(driverOps['out_ep'], 16) + driverOps['out_ep'] = hex(driverOps['out_ep'], 16) if 'in_ep' in driverOps: - driverOps['in_ep'] = int(driverOps['in_ep'], 16) + driverOps['in_ep'] = hex(driverOps['in_ep'], 16) if 'idVendor' in driverOps: - driverOps['idVendor'] = int(driverOps['idVendor'], 16) + driverOps['idVendor'] = hex(driverOps['idVendor'], 16) if 'idProduct' in driverOps: - driverOps['idProduct'] = int(driverOps['idProduct'], 16) + driverOps['idProduct'] = hex(driverOps['idProduct'], 16) + printer("*-*-* ACHALAYYYY -* **- -*-") + printer("*-*-* ACHALAYYYY -* **- -*-") + printer("*-*-* ACHALAYYYY -* **- -*-") + printer("*-*-* ACHALAYYYY -* **- -*-") + + printer(driverOps) + printer("*-*-* ACHALAYYYY -* **- -*-") + printer("*-*-* ACHALAYYYY -* **- -*-") + printer("*-*-* ACHALAYYYY -* **- -*-") logger.info("Los parametros a enviar driver USB son") logger.info(driverOps) driver = printer.Usb(**driverOps)