mirror of
https://github.com/qmk/qmk_firmware.git
synced 2024-12-03 08:25:11 +00:00
format
This commit is contained in:
parent
05911e9908
commit
56c9f7b7ff
@ -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
|
||||
|
@ -121,4 +121,3 @@ def generate_header(output_file, keyboard):
|
||||
lines.append('')
|
||||
|
||||
dump_lines(output_file, lines)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user