v1.9.0 #53

Merged
muellerr merged 354 commits from develop into master 2022-04-07 17:39:42 +02:00
Showing only changes of commit eca5bba1d8 - Show all commits

View File

@ -26,6 +26,7 @@ def ccsds_tm_handler(apid: int, raw_tm_packet: bytearray, tmtc_printer: TmTcPrin
def pus_factory_hook(raw_tm_packet: bytearray, tmtc_printer: TmTcPrinter): def pus_factory_hook(raw_tm_packet: bytearray, tmtc_printer: TmTcPrinter):
service_type = raw_tm_packet[7] service_type = raw_tm_packet[7]
tm_packet = None tm_packet = None
try:
if service_type == 1: if service_type == 1:
tm_packet = Service1TMExtended.unpack(raw_telemetry=raw_tm_packet) tm_packet = Service1TMExtended.unpack(raw_telemetry=raw_tm_packet)
if service_type == 3: if service_type == 3:
@ -40,3 +41,6 @@ def pus_factory_hook(raw_tm_packet: bytearray, tmtc_printer: TmTcPrinter):
LOGGER.info(f'The service {service_type} is not implemented in Telemetry Factory') LOGGER.info(f'The service {service_type} is not implemented in Telemetry Factory')
tm_packet = PusTelemetry.unpack(raw_telemetry=raw_tm_packet) tm_packet = PusTelemetry.unpack(raw_telemetry=raw_tm_packet)
tmtc_printer.print_telemetry(packet_if=tm_packet, info_if=tm_packet, print_raw_tm=False) tmtc_printer.print_telemetry(packet_if=tm_packet, info_if=tm_packet, print_raw_tm=False)
except ValueError:
# TODO: Log faulty packet
LOGGER.warning("Invalid packet format detected")