From 22ea3eea9278c3f73c0f804dc3618ea004fe224b Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 28 Sep 2021 16:21:20 +0200 Subject: [PATCH] update to new tmtccmd version --- config/hook_implementation.py | 2 +- pus_tm/factory_hook.py | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/config/hook_implementation.py b/config/hook_implementation.py index d0d15d9..11afbed 100644 --- a/config/hook_implementation.py +++ b/config/hook_implementation.py @@ -40,7 +40,7 @@ class FsfwHookBase(TmTcHookBase): from tmtccmd.config.com_if import create_communication_interface_default return create_communication_interface_default( com_if_key=com_if_key, tmtc_printer=tmtc_printer, - json_cfg_path=self.get_json_config_file_path() + json_cfg_path=self.get_json_config_file_path(), space_packet_id=0x08ef ) def perform_mode_operation(self, tmtc_backend: TmTcHandler, mode: int): diff --git a/pus_tm/factory_hook.py b/pus_tm/factory_hook.py index df47cf7..27e216f 100644 --- a/pus_tm/factory_hook.py +++ b/pus_tm/factory_hook.py @@ -31,22 +31,22 @@ def pus_packet_factory(raw_tm_packet: bytearray, tmtc_printer: TmTcPrinter): service_type = raw_tm_packet[7] tm_packet = None if service_type == 1: - tm_packet = Service1TM(raw_tm_packet) + tm_packet = Service1TM.unpack(raw_tm_packet) if service_type == 2: - tm_packet = Service2TM(raw_tm_packet) + tm_packet = Service2TM.unpack(raw_tm_packet) if service_type == 3: - tm_packet = Service3TM(raw_tm_packet) + tm_packet = Service3TM.unpack(raw_tm_packet, custom_hk_handling=False) if service_type == 8: - tm_packet = Service8TM(raw_tm_packet) + tm_packet = Service8TM.unpack(raw_tm_packet) if service_type == 5: - tm_packet = Service5TM(raw_tm_packet) + tm_packet = Service5TM.unpack(raw_tm_packet) if service_type == 17: - tm_packet = Service17TM(raw_tm_packet) + tm_packet = Service17TM.unpack(raw_tm_packet) if service_type == 20: - tm_packet = Service20TM(raw_tm_packet) + tm_packet = Service20TM.unpack(raw_tm_packet) if service_type == 200: - tm_packet = Service200TM(raw_tm_packet) + tm_packet = Service200TM.unpack(raw_tm_packet) if tm_packet is None: LOGGER.info("The service " + str(service_type) + " is not implemented in Telemetry Factory") - tm_packet = PusTelemetry(raw_tm_packet) - tmtc_printer.print_telemetry(packet=tm_packet) + tm_packet = PusTelemetry.unpack(raw_tm_packet) + tmtc_printer.print_telemetry(packet_if=tm_packet, info_if=tm_packet)