STR Improv #283
@ -916,6 +916,10 @@ def unpack_time_hk(hk_data: bytes, current_idx: int, pw: PrintWrapper) -> int:
|
|||||||
|
|
||||||
def handle_version_set(hk_data: bytes, pw: PrintWrapper):
|
def handle_version_set(hk_data: bytes, pw: PrintWrapper):
|
||||||
pw.dlog("Received Version Set")
|
pw.dlog("Received Version Set")
|
||||||
|
if len(hk_data) != 16:
|
||||||
|
_LOGGER.warning(
|
||||||
|
f"Version dataset HK with length {len(hk_data)} of unexpected size"
|
||||||
|
)
|
||||||
current_idx = unpack_time_hk(hk_data, 0, pw)
|
current_idx = unpack_time_hk(hk_data, 0, pw)
|
||||||
program = struct.unpack("!B", hk_data[current_idx : current_idx + 1])[0]
|
program = struct.unpack("!B", hk_data[current_idx : current_idx + 1])[0]
|
||||||
pw.dlog(f"Program: {program}")
|
pw.dlog(f"Program: {program}")
|
||||||
|
Loading…
Reference in New Issue
Block a user