new send_cb argument

This commit is contained in:
Robin Müller 2022-07-14 15:45:57 +02:00
parent 350afc7ee7
commit 2482a79db7
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
2 changed files with 6 additions and 5 deletions

2
deps/tmtccmd vendored

@ -1 +1 @@
Subproject commit 7ba0dd3bc5a328a7445c40cf801f587624b46652
Subproject commit 5627f6c99f7a277d514f7b48e540f575c08031b6

View File

@ -4,6 +4,8 @@ import sys
import time
import traceback
from tmtccmd.tc.handler import SendCbParams
try:
import spacepackets
except ImportError as error:
@ -26,7 +28,6 @@ except ImportError as error:
from spacepackets.ecss import PusVerificator
from tmtccmd import get_console_logger, TcHandlerBase, BackendBase
from tmtccmd.com_if import ComInterface
from tmtccmd.util import FileSeqCountProvider, PusFileSeqCountProvider
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
@ -43,7 +44,6 @@ from tmtccmd.tc import (
ProcedureHelper,
FeedWrapper,
TcProcedureType,
QueueEntryHelper,
TcQueueEntryType,
)
from tmtccmd.config import default_json_path, SetupWrapper
@ -101,7 +101,8 @@ class TcHandler(TcHandlerBase):
if info.proc_type == TcProcedureType.DEFAULT:
handle_default_procedure(info.to_def_procedure(), wrapper, self.gui)
def send_cb(self, entry_helper: QueueEntryHelper, com_if: ComInterface):
def send_cb(self, send_params: SendCbParams):
entry_helper = send_params.entry
if entry_helper.is_tc:
if entry_helper.entry_type == TcQueueEntryType.PUS_TC:
pus_tc_wrapper = entry_helper.to_pus_tc_entry()
@ -118,7 +119,7 @@ class TcHandler(TcHandlerBase):
self.file_logger.info(
f"{get_current_time_string(True)}: {tc_info_string}"
)
com_if.send(raw_tc)
send_params.com_if.send(raw_tc)
elif entry_helper.entry_type == TcQueueEntryType.LOG:
log_entry = entry_helper.to_log_entry()
LOGGER.info(log_entry.log_str)