From c155b16ec9ff0567a279ab24f07272f27c688d81 Mon Sep 17 00:00:00 2001 From: zvecr Date: Sat, 9 Jul 2022 00:21:34 +0100 Subject: [PATCH] Minor tidy up of cli --- lib/python/qmk/cli/xap/xap.py | 4 ++-- lib/python/qmk/cli/xap/xap_client.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/python/qmk/cli/xap/xap.py b/lib/python/qmk/cli/xap/xap.py index 0ae425d93cd..be86e0a6f0b 100644 --- a/lib/python/qmk/cli/xap/xap.py +++ b/lib/python/qmk/cli/xap/xap.py @@ -191,7 +191,7 @@ class XAPShell(cmd.Cmd): @cli.argument('-d', '--device', help='device to select - uses format :.') @cli.argument('-l', '--list', arg_only=True, action='store_true', help='List available devices.') @cli.argument('-i', '--interactive', arg_only=True, action='store_true', help='Start interactive shell.') -@cli.argument('action', nargs='*', default=['listen'], arg_only=True) +@cli.argument('action', nargs='*', arg_only=True, default=['listen'], help='Shell command and any arguments to run standalone') @cli.subcommand('Acquire debugging information from usb XAP devices.', hidden=False if cli.config.user.developer else True) def xap(cli): """Acquire debugging information from XAP devices @@ -206,7 +206,7 @@ def xap(cli): return False dev = devices[0] - cli.log.info('Connecting to:%04x:%04x %s %s', dev['vendor_id'], dev['product_id'], dev['manufacturer_string'], dev['product_string']) + cli.log.info('Connecting to: %04x:%04x %s %s', dev['vendor_id'], dev['product_id'], dev['manufacturer_string'], dev['product_string']) device = XAPClient().connect(dev) # shell? diff --git a/lib/python/qmk/cli/xap/xap_client.py b/lib/python/qmk/cli/xap/xap_client.py index 826a79c91f6..c279e881182 100644 --- a/lib/python/qmk/cli/xap/xap_client.py +++ b/lib/python/qmk/cli/xap/xap_client.py @@ -67,7 +67,7 @@ class XAPDevice: """Background thread to signal waiting transactions """ while 1: - array_alpha = self.dev.read(64, 100) + array_alpha = self.dev.read(ResponseStruct.size, 100) if array_alpha: token = int.from_bytes(array_alpha[:2], 'little') event = self.responses.get(token)