This commit is contained in:
@ -264,14 +264,16 @@ def pack_ploc_supv_commands(p: ServiceProviderParams): # noqa C901
|
||||
action_cmd = create_action_cmd(
|
||||
PLOC_SUPV_ID, SupvActionId.GET_BOOT_STATUS_REPORT
|
||||
)
|
||||
q.add_wait_seconds(2.0)
|
||||
|
||||
if action_cmd is None:
|
||||
_LOGGER.warning(f"invalid set ID {set_id!r} for PLOC SUPV")
|
||||
return
|
||||
# Now dump the HK set.
|
||||
sid = make_sid(object_id.as_bytes, set_id)
|
||||
req_hk = generate_one_hk_command(sid)
|
||||
q.add_pus_tc(action_cmd)
|
||||
q.add_wait_seconds(2.0)
|
||||
q.add_pus_tc(req_hk)
|
||||
assert action_cmd is not None
|
||||
q.add_pus_tc(action_cmd)
|
||||
elif op_code == OpCode.START_MPSOC:
|
||||
q.add_log_cmd("PLOC Supervisor: Start MPSoC")
|
||||
command = obyt + struct.pack("!I", SupvActionId.START_MPSOC)
|
||||
@ -885,14 +887,21 @@ def handle_latchup_status_report(hk_data: bytes):
|
||||
current_idx += 1
|
||||
time_month = hk_data[current_idx]
|
||||
current_idx += 1
|
||||
time_year = hk_data[current_idx]
|
||||
dt = datetime(
|
||||
year=time_year,
|
||||
month=time_month,
|
||||
day=time_day,
|
||||
hour=time_hour,
|
||||
minute=time_minutes,
|
||||
second=time_seconds,
|
||||
microsecond=time_ms * 1000,
|
||||
)
|
||||
print(f"Time Now: {dt}")
|
||||
# Is stored as years since 1900.
|
||||
time_year = 1900 + hk_data[current_idx]
|
||||
try:
|
||||
dt = datetime(
|
||||
year=time_year,
|
||||
month=time_month,
|
||||
day=time_day,
|
||||
hour=time_hour,
|
||||
minute=time_minutes,
|
||||
second=time_seconds,
|
||||
microsecond=time_ms * 1000,
|
||||
)
|
||||
print(f"Time Now: {dt}")
|
||||
except ValueError:
|
||||
print(
|
||||
f"Time: {time_day}.{time_month}.{time_year}T"
|
||||
f"{time_hour}:{time_minutes}:{time_seconds}.{time_ms}"
|
||||
)
|
||||
|
Reference in New Issue
Block a user