seems to work now

This commit is contained in:
Robin Müller 2022-05-11 15:42:00 +02:00
parent a648b7f76f
commit bc02c9d607
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
2 changed files with 15 additions and 12 deletions

View File

@ -7,7 +7,7 @@ from typing import Union
from spacepackets.ecss import PusTelecommand
from tmtccmd.com_if.com_interface_base import CommunicationInterface
from tmtccmd.config.definitions import CoreServiceList
from tmtccmd.config.definitions import CoreServiceList, QueueCommands
from tmtccmd.logging import get_console_logger
from tmtccmd.logging.pus import log_raw_pus_tc
from tmtccmd.tc.definitions import TcQueueT
@ -76,19 +76,22 @@ LOGGER = get_console_logger()
def pre_tc_send_cb(
packet: bytes,
queue_entry: Union[bytes, QueueCommands],
com_if: CommunicationInterface,
pus_info: Union[PusTelecommand, any],
queue_info: Union[PusTelecommand, any],
file_logger: logging.Logger,
):
log_raw_pus_tc(
packet=packet, srv_subservice=(pus_info.service, pus_info.subservice)
)
tc_info_string = f"Sent {pus_info}"
LOGGER.info(tc_info_string)
file_logger.info(f"{get_current_time_string(True)}: {tc_info_string}")
com_if.send(data=packet)
if isinstance(queue_entry, bytes) or isinstance(queue_entry, bytearray):
log_raw_pus_tc(
packet=queue_entry, srv_subservice=(queue_info.service, queue_info.subservice)
)
tc_info_string = f"Sent {queue_info}"
LOGGER.info(tc_info_string)
file_logger.info(f"{get_current_time_string(True)}: {tc_info_string}")
com_if.send(data=queue_entry)
elif isinstance(queue_entry, QueueCommands):
if queue_entry == QueueCommands.PRINT:
file_logger.info(queue_info)
def pack_service_queue_user(
service: Union[str, int], op_code: str, service_queue: TcQueueT

@ -1 +1 @@
Subproject commit 11960d5b35db30c25c1306cab663224fbb1deb86
Subproject commit d503c8b8a95d107f482880a8ba692fdd8d46adbc