From 248df1d4df8ca9fb877b550586623385b3e7e6e5 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 31 Jan 2024 16:57:59 +0100 Subject: [PATCH] added missing field parsing --- eive_tmtc/tmtc/payload/ploc_supervisor.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/eive_tmtc/tmtc/payload/ploc_supervisor.py b/eive_tmtc/tmtc/payload/ploc_supervisor.py index 10032fd..93e7095 100644 --- a/eive_tmtc/tmtc/payload/ploc_supervisor.py +++ b/eive_tmtc/tmtc/payload/ploc_supervisor.py @@ -861,8 +861,8 @@ def handle_counters_report(hk_data: bytes): def handle_latchup_status_report(hk_data: bytes): - # 1 byte ID, 7 times 2 bytes of counts, and 8 bytes of time. - if len(hk_data) < 23: + # 1 byte ID, 7 times 2 bytes of counts, and 8 bytes of time and 1 byte sync status. + if len(hk_data) < 24: raise ValueError("Latchup status report smaller than expected") current_idx = 0 id = hk_data[current_idx] @@ -889,6 +889,9 @@ def handle_latchup_status_report(hk_data: bytes): current_idx += 1 # Is stored as years since 1900. time_year = 1900 + hk_data[current_idx] + current_idx += 1 + is_synced = hk_data[current_idx] + print(f"Time Sync Status: {is_synced}") try: dt = datetime( year=time_year,