STR Improv #283

Merged
muellerr merged 4 commits from str-version into main 2024-03-14 10:55:59 +01:00
Showing only changes of commit 5f71f27f0e - Show all commits

View File

@ -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):
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)
program = struct.unpack("!B", hk_data[current_idx : current_idx + 1])[0]
pw.dlog(f"Program: {program}")