diff --git a/config/hook_implementations.py b/config/hook_implementations.py index f8e7a60..3cc9be8 100644 --- a/config/hook_implementations.py +++ b/config/hook_implementations.py @@ -125,7 +125,7 @@ def get_eive_service_op_code_dict(service_op_code_dict: ServiceOpCodeDictT): add_rw_cmds, add_rad_sens_cmds, add_ploc_cmds, - add_system_cmds + add_system_cmds, ) from pus_tc.devs.gps import GpsOpCodes diff --git a/pus_tc/system/acs.py b/pus_tc/system/acs.py index f2a2471..c558189 100644 --- a/pus_tc/system/acs.py +++ b/pus_tc/system/acs.py @@ -19,15 +19,15 @@ class AcsBoardSubmodes(enum.IntEnum): def pack_acs_command(tc_queue: TcQueueT, op_code: str): if op_code in AcsOpCodes.ACS_ASS_A_SIDE: - tc_queue.appendleft((QueueCommands.PRINT, "Switching to ACS board assembly A side")) + tc_queue.appendleft( + (QueueCommands.PRINT, "Switching to ACS board assembly A side") + ) mode_data = pack_mode_data( object_id=ACS_BOARD_ASS_ID, mode=Modes.NORMAL, submode=AcsBoardSubmodes.A_SIDE, ) cmd = PusTelecommand( - service=200, - subservice=Subservices.COMMAND_MODE_COMMAND, - app_data=mode_data + service=200, subservice=Subservices.COMMAND_MODE_COMMAND, app_data=mode_data ) tc_queue.appendleft(cmd.pack_command_tuple()) diff --git a/pus_tm/event_handler.py b/pus_tm/event_handler.py index 8bc083f..8d64db5 100644 --- a/pus_tm/event_handler.py +++ b/pus_tm/event_handler.py @@ -2,7 +2,7 @@ import os.path from config.object_ids import get_object_ids from tmtccmd.utility.logger import get_console_logger -from tmtccmd.utility.fsfw import parse_fsfw_events_csv, EventDictT +from tmtccmd.utility.fsfw import parse_fsfw_events_csv, EventDictT, EventInfo LOGGER = get_console_logger() DEFAULT_EVENTS_CSV_PATH = "config/events.csv" @@ -26,8 +26,12 @@ def handle_event_packet( additional_event_info = "" event_dict = get_event_dict() info = event_dict.get(event_id) + if info is None: + LOGGER.warning(f"Event ID {event_id} has no information") + info = EventInfo() + info.name = "Unknown event" obj_ids = get_object_ids() - obj_id_obj = obj_ids.get(object_id) + obj_id_obj = obj_ids.get(bytes(object_id)) if obj_id_obj is None: LOGGER.warning(f"Object ID 0x{object_id.hex()} has no name") obj_name = object_id.hex() diff --git a/tmtccmd b/tmtccmd index 0f4d473..7c07bee 160000 --- a/tmtccmd +++ b/tmtccmd @@ -1 +1 @@ -Subproject commit 0f4d4730ab35163c5a06138f4b54e4eaf89bc24c +Subproject commit 7c07bee65159f5f75faeadf1a130381bc6d63334