added missing field parsing
EIVE/-/pipeline/head This commit looks good Details

This commit is contained in:
Robin Müller 2024-01-31 16:57:59 +01:00
parent f93f713b0e
commit 248df1d4df
Signed by: muellerr
GPG Key ID: A649FB78196E3849
1 changed files with 5 additions and 2 deletions

View File

@ -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,