This commit is contained in:
parent
c6b2edf688
commit
f93f713b0e
@ -1,6 +1,7 @@
|
||||
"""HK Handling for EIVE OBSW"""
|
||||
import dataclasses
|
||||
import logging
|
||||
import base64 # noqa
|
||||
from typing import List
|
||||
|
||||
from eive_tmtc.tmtc.acs.acs_ctrl import handle_acs_ctrl_hk_data
|
||||
@ -70,6 +71,7 @@ def handle_hk_packet(
|
||||
hk_data = tm_packet.tm_data[8:]
|
||||
|
||||
if named_obj_id in hk_filter.object_ids:
|
||||
# print(f"PUS TM Base64: {base64.b64encode(raw_tm)}")
|
||||
handle_regular_hk_print(
|
||||
printer=printer,
|
||||
object_id=named_obj_id,
|
||||
|
@ -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}"
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user