Merge remote-tracking branch 'origin/main' into mpsoc-overhaul
EIVE/-/pipeline/pr-main This commit looks good Details

This commit is contained in:
Robin Müller 2024-04-30 14:36:41 +02:00
commit 5e1b12fa52
4 changed files with 28 additions and 14 deletions

View File

@ -14,6 +14,10 @@ list yields a list of all related PRs for each release.
- Reworked PLOC MPSoC commanding to be inline with OBSW update.
## Fixed
- GNSS commands working again (again).
## Added
- Added handling for new clock events.

View File

@ -227,7 +227,7 @@ def handle_acs_procedure(queue_helper: DefaultPusQueueHelper, cmd_path_list: Lis
object_id=RW4_ID, rw_idx=4, q=queue_helper, cmd_str=cmd_path_list[2]
)
if cmd_path_list[0] == "gnss_devs":
if cmd_path_list[0] == "gnss_ctrl":
return pack_gps_command(
object_id=oids.GPS_CONTROLLER, q=queue_helper, cmd_str=cmd_path_list[1]
)

View File

@ -23,7 +23,11 @@ class GpsInfo:
MAX_SATELLITES = 30
class GnssChip(enum.IntEnum):
class ActIds:
RESET_GNSS = 5
class AcsBoardSides(enum.IntEnum):
A_SIDE = 0
B_SIDE = 1
@ -37,7 +41,7 @@ class OpCode:
REQ_SKYVIEW_HK = "skyview_hk_request"
ENABLE_SKYVIEW_HK = "skyview_hk_enable"
DISABLE_SKYVIEW_HK = "skyview_hk_disable"
RESET_GNSS = "reset"
RESET_GNSS = "reset_gnss"
class Info:
@ -63,7 +67,7 @@ def create_gnss_node() -> CmdTreeNode:
]
info_strs = [getattr(Info, key) for key in dir(OpCode) if not key.startswith("__")]
combined_dict = dict(zip(op_code_strs, info_strs))
node = CmdTreeNode("gnss_devs", "GNSS Controller", hide_children_for_print=True)
node = CmdTreeNode("gnss_ctrl", "GNSS Ctrl", hide_children_for_print=True)
for op_code, info in combined_dict.items():
node.add_child(CmdTreeNode(op_code, info))
return node
@ -73,16 +77,17 @@ def pack_gps_command( # noqa: C901
object_id: bytes, q: DefaultPusQueueHelper, cmd_str: str
): # noqa: C901:
if cmd_str == OpCode.RESET_GNSS:
for val in GnssChip:
for val in AcsBoardSides:
print("{:<2}: {:<20}".format(val, val.name))
chip: str = ""
while chip not in ["0", "1"]:
chip = input("Please specify which chip to reset: ")
q.add_log_cmd(f"gps: {Info.DISABLE_CORE_HK}")
board_side = int(input("Select Board Side \n" ""))
q.add_log_cmd(f"GPS: {Info.RESET_GNSS}")
q.add_pus_tc(
create_action_cmd(object_id=object_id, action_id=5, user_data=chip.encode())
create_action_cmd(
object_id=object_id,
action_id=ActIds.RESET_GNSS,
user_data=bytearray([board_side]),
)
)
_LOGGER.warning("Reset pin handling needs to be re-implemented")
if cmd_str == OpCode.ENABLE_CORE_HK:
interval = float(input("Please specify interval in floating point seconds: "))
if interval <= 0:

View File

@ -650,8 +650,10 @@ def get_event_buffer_path() -> str:
class SocState(enum.IntEnum):
OFF = 0
BOOTING = 1
OPERATIONAL = 2
SHUTDOWN = 3
UPDATE = 2
OPERATIONAL = 3
RESET = 4
FAULTY = 5
def handle_supv_hk_data(set_id: int, hk_data: bytes, pw: PrintWrapper):
@ -691,7 +693,10 @@ def handle_hk_report(hk_data: bytes, pw: PrintWrapper):
pw.dlog(f"Temp PS {temp_ps} C | Temp PL {temp_pl} C | Temp SUP {temp_sup} C")
pw.dlog(f"Uptime {uptime} | CPU Load {cpu_load} | Avail Heap {avail_heap}")
pw.dlog(f"Number TCs {num_tcs} | Number TMs {num_tms}")
pw.dlog(f"SOC state {SocState(soc_state)}")
try:
pw.dlog(f"SOC state {SocState(soc_state)}")
except ValueError:
pw.dlog(f"Invalid SOC state {soc_state}")
pw.dlog(f"NVM 01 State {nvm_0_1_state}")
pw.dlog(f"NVM 3 State {nvm_3_state}")
pw.dlog(f"Mission IO state {mission_io_state}")