Commit 3749440b authored by Robin Mueller's avatar Robin Mueller
Browse files

command prep formatz changed

parent 545778ac
......@@ -6,7 +6,7 @@ from typing import Tuple, Union
from tmtc_core.core.tmtc_core_definitions import ComInterfaces
from tmtc_core.utility.tmtcc_logger import get_logger
from tmtc_core.pus_tc.tmtcc_pus_tc_base import PusTcInfo
from tmtc_core.pus_tc.tmtcc_pus_tc_base import PusTcInfo, PusTelecommand
from tmtc_core.sendreceive.tmtcc_single_command_sender_receiver import SingleCommandSenderReceiver
from tmtc_core.sendreceive.tmtcc_sequential_sender_receiver import SequentialCommandSenderReceiver
from tmtc_core.sendreceive.tmtcc_tm_listener import TmListener
......@@ -146,10 +146,9 @@ class TmTcHandler:
self.tm_listener.clear_reply_event()
elif self.mode == ModeList.SingleCommandMode:
if self.single_command_package is None:
pus_packet_tuple = command_preparation()
if self.single_command_package[1] is None:
pus_packet_tuple = command_preparation().pack_command_tuple()
else:
LOGGER.info("Sending single packet from GUI..")
pus_packet_tuple = self.single_command_package
sender_and_receiver = SingleCommandSenderReceiver(
com_interface=self.communication_interface, tmtc_printer=self.tmtc_printer,
......@@ -235,7 +234,7 @@ class TmTcHandler:
# tmtc_handler.perform_operation()
def command_preparation() -> Tuple[bytearray, Union[None, PusTcInfo]]:
def command_preparation() -> PusTelecommand:
"""
Prepare command for single command testing
:return:
......
"""
@brief This file exposes hook functions to the user.
@details Template configuration file. Copy this folder to the TMTC commander root and adapt
it to your needs.
"""
from tmtc_core.pus_tc.tmtcc_pus_tc_base import PusTelecommand
def command_preparation_hook() -> PusTelecommand:
"""
Can be used to pack user-defined commands by generating and returning a PusTelecommand
class instance
"""
return PusTelecommand(service=17, subservice=1, ssc=20)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment