diff --git a/eive_tmtc/pus_tm/event_handler.py b/eive_tmtc/pus_tm/event_handler.py index e5cfc35..2048ccf 100644 --- a/eive_tmtc/pus_tm/event_handler.py +++ b/eive_tmtc/pus_tm/event_handler.py @@ -36,6 +36,7 @@ def handle_event_packet( # noqa C901: Complexity okay here obj_name = event_def.reporter_id.hex(sep=",") else: obj_name = obj_id_obj.name + assert tm.time_provider is not None generic_event_string = ( f"Object {obj_name} generated Event {info.name} (ID: {event_def.event_id:#04x})" f" at {tm.time_provider.as_date_time()}" @@ -128,12 +129,16 @@ def handle_event_packet( # noqa C901: Complexity okay here time = event_def.param1 + event_def.param2 / 1000.0 time_dt = datetime.datetime.fromtimestamp(time, datetime.timezone.utc) pw.dlog(f"Current time: {time_dt}") - if info.name == "CLOCK_DUMP": + if ( + info.name == "CLOCK_DUMP" + or info.name == "CLOCK_DUMP_BEFORE_SETTING_TIME" + or info.name == "CLOCK_DUMP_AFTER_SETTING_TIME" + ): specific_handler = True # param 1 is timeval seconds, param 2 is timeval subsecond microseconds time = event_def.param1 + event_def.param2 / 1000000.0 time_dt = datetime.datetime.fromtimestamp(time, datetime.timezone.utc) - pw.dlog(f"Current time: {time_dt}") + pw.dlog(f"Clock dump event {info.name}. Current time: {time_dt}") if info.name == "ACTIVE_SD_INFO": sd_0_state = (event_def.param2 >> 16) & 0xFFFF sd_1_state = event_def.param2 & 0xFFFF