From 5c21830da2062a80069e5855e3e43148b4dc0e0d Mon Sep 17 00:00:00 2001 From: zvecr Date: Sun, 17 Jul 2022 22:03:53 +0100 Subject: [PATCH] Tidy up python client - add file --- lib/python/xap_client/util.py | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 lib/python/xap_client/util.py diff --git a/lib/python/xap_client/util.py b/lib/python/xap_client/util.py new file mode 100644 index 00000000000..f09d99e0bbd --- /dev/null +++ b/lib/python/xap_client/util.py @@ -0,0 +1,4 @@ +def u32toBCD(val): # noqa: N802 + """Create BCD string + """ + return f'{val>>24}.{val>>16 & 0xFF}.{val & 0xFFFF}'