From 56c9f7b7ff23196afba65b66f632fcc10070175d Mon Sep 17 00:00:00 2001 From: zvecr Date: Tue, 29 Mar 2022 19:25:16 +0100 Subject: [PATCH] format --- lib/python/qmk/cli/xap/xap.py | 5 +++-- lib/python/qmk/xap/gen_firmware/header_generator.py | 1 - 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 bfd9511711e..7826ed33d66 100644 --- a/lib/python/qmk/cli/xap/xap.py +++ b/lib/python/qmk/cli/xap/xap.py @@ -56,11 +56,12 @@ def _xap_transaction(device, sub, route, ret_len, *args): args_len += 2 args_data = args[0].to_bytes(2, byteorder='big') - padding = b"\x00" * (64 - 3 - args_len) + padding_len = 64 - 3 - args_len + padding = b"\x00" * padding_len if args_data: padding = args_data + padding buffer = token + args_len.to_bytes(1, byteorder='big') + sub.to_bytes(1, byteorder='big') + route.to_bytes(1, byteorder='big') + padding - + # prepend 0 on windows because reasons... if 'windows' in platform().lower(): buffer = b"\x00" + buffer diff --git a/lib/python/qmk/xap/gen_firmware/header_generator.py b/lib/python/qmk/xap/gen_firmware/header_generator.py index bb0df059592..42d54e1960c 100755 --- a/lib/python/qmk/xap/gen_firmware/header_generator.py +++ b/lib/python/qmk/xap/gen_firmware/header_generator.py @@ -121,4 +121,3 @@ def generate_header(output_file, keyboard): lines.append('') dump_lines(output_file, lines) -