mirror of
https://github.com/qmk/qmk_firmware.git
synced 2026-07-12 11:54:24 -04:00
Fix xap cli bcd output
This commit is contained in:
@@ -17,7 +17,12 @@ from .routes import XAPRoutes, XAPRouteError
|
||||
def _u32_to_bcd(val: bytes) -> str: # noqa: N802
|
||||
"""Create BCD string
|
||||
"""
|
||||
return f'{val>>24}.{val>>16 & 0xFF}.{val & 0xFFFF}'
|
||||
tmp = "{:08x}".format(val)
|
||||
major = int(tmp[0:2])
|
||||
minor = int(tmp[2:4])
|
||||
patch = int(tmp[4:8])
|
||||
|
||||
return f'{major}.{minor}.{patch}'
|
||||
|
||||
|
||||
def _gen_token() -> bytes:
|
||||
|
||||
Reference in New Issue
Block a user