more robust
This commit is contained in:
parent
4e2d561b96
commit
8cfc2892dd
@ -24,6 +24,9 @@ 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):
|
||||||
|
if len(raw_tm_packet) < 8:
|
||||||
|
LOGGER.warning("Detected packet shorter than 8 bytes!")
|
||||||
|
return
|
||||||
service_type = raw_tm_packet[7]
|
service_type = raw_tm_packet[7]
|
||||||
tm_packet = None
|
tm_packet = None
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user