minor bugfixes for event handling
This commit is contained in:
@ -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()
|
||||
|
Reference in New Issue
Block a user