diff --git a/common.py b/common.py index 6771fee..d0d7385 100644 --- a/common.py +++ b/common.py @@ -168,6 +168,9 @@ def setup_params(hook_obj: TmTcCfgHookBase) -> SetupWrapper: print(f"-- spacepackets v{spacepackets.__version__} --") params = SetupParams() parser_wrapper = ArgParserWrapper(hook_obj) + parser_wrapper.create_default_parent_parser() + parser_wrapper.create_default_parser() + parser_wrapper.add_def_proc_args() parser_wrapper.parse() tmtccmd.init_printout(parser_wrapper.use_gui) parser_wrapper.set_params(params) diff --git a/pus_tc/service_3_housekeeping.py b/pus_tc/service_3_housekeeping.py index d009b0c..e17ea0d 100644 --- a/pus_tc/service_3_housekeeping.py +++ b/pus_tc/service_3_housekeeping.py @@ -11,7 +11,7 @@ from tmtccmd.tc.pus_20_params import ( ) from tmtccmd.tc.pus_3_fsfw_hk import make_sid, generate_one_hk_command import tmtccmd.tc.pus_3_fsfw_hk as srv3 -from tmtccmd.tc.pus_8_funccmd import generate_action_command +from tmtccmd.tc.pus_8_funccmd import make_fsfw_action_cmd from common_tmtc.config.object_ids import TEST_DEVICE_0_ID, TEST_DEVICE_1_ID @@ -166,7 +166,5 @@ def pack_notification_basic_test( q.add_log_cmd("Triggering notification") q.add_pus_tc( - generate_action_command( - object_id=object_id, action_id=TEST_NOTIFICATION_ACTION_ID - ) + make_fsfw_action_cmd(object_id=object_id, action_id=TEST_NOTIFICATION_ACTION_ID) ) diff --git a/pus_tm/factory_hook.py b/pus_tm/factory_hook.py index b998912..a7afbdd 100644 --- a/pus_tm/factory_hook.py +++ b/pus_tm/factory_hook.py @@ -3,12 +3,13 @@ @details Template configuration file. Copy this folder to the TMTC commander root and adapt it to your needs. """ +from spacepackets.ecss.pus_17_test import Service17Tm +import spacepackets.ecss.pus_17_test as pus17 from spacepackets.ecss.tm import PusTelemetry from spacepackets.util import PrintFormats from tmtccmd.logging.pus import RawTmtcTimedLogWrapper from tmtccmd.pus import VerificationWrapper -from tmtccmd.tm.pus_17_test import Service17TmExtended from tmtccmd.tm.pus_2_rawcmd import Service2Tm from tmtccmd.tm.pus_20_fsfw_parameters import Service20FsfwTm from tmtccmd.tm.pus_200_fsfw_modes import Service200FsfwTm @@ -55,8 +56,10 @@ def pus_factory_hook( elif service == 5: handle_event_packet(raw_tm=packet, printer=printer, file_logger=file_logger) elif service == 17: - tm_packet = Service17TmExtended.unpack(raw_telemetry=packet) - dedicated_handler = False + tm_packet = Service17Tm.unpack(raw_telemetry=packet) + if tm_packet.subservice == pus17.Subservices.TM_REPLY: + wrapper.dlog("Received Ping Reply TM[17,2]") + dedicated_handler = True elif service == 20: tm_packet = Service20FsfwTm.unpack(raw_telemetry=packet) dedicated_handler = False