diff --git a/config/OBSW_Config.py b/config/OBSW_Config.py index bf38c78b1601f61f68798952bcc2baeaa3115b61..c5ab2160e0459cb769df5b5f75d5654f5f9f039e 100644 --- a/config/OBSW_Config.py +++ b/config/OBSW_Config.py @@ -40,6 +40,7 @@ Mission/Device specific information. # Object IDs GPS0_ObjectId = bytearray([0x44, 0x10, 0x1F, 0x00]) GPS1_ObjectId = bytearray([0x44, 0x20, 0x20, 0x00]) +DUMMY_DEVICE_ID = bytearray([0x44, 0x00, 0xAF, 0xFE]) # SIDs GPS0_SID = bytearray([0x00, 0x00, 0x1f, 0x00]) diff --git a/obsw_tmtc_client.py b/obsw_tmtc_client.py index 7ec3c6338f3ddb830a0762ae07228347644e2fa5..5dab45b0fff247c5d3a183e50ae6896271838dea 100644 --- a/obsw_tmtc_client.py +++ b/obsw_tmtc_client.py @@ -111,7 +111,7 @@ def main(): sender_and_receiver = SingleCommandSenderReceiver( comInterface=communication_interface, tmtcPrinter=tmtc_printer, tmListener=tm_listener, pusPacketTuple=pus_packet_tuple, tmTimeout=g.G_TM_TIMEOUT, - tcTimeoutFactor=g.G_TC_SEND_TIMEOUT_FACTOR, doPrintToFile=g.G_PRINT_TO_FILE) + tcTimeoutFactor=g.G_TC_SEND_TIMEOUT_FACTOR) sender_and_receiver.send_single_tc_and_receive_tm() elif g.G_MODE_ID == g.ModeList.ServiceTestMode: diff --git a/sendreceive/obsw_single_command_sender_receiver.py b/sendreceive/obsw_single_command_sender_receiver.py index 238f0d35f58af6fb52960e4659facb686cfe5f7b..b7c9d299bb9c61036f5e7441632aed1356400db6 100644 --- a/sendreceive/obsw_single_command_sender_receiver.py +++ b/sendreceive/obsw_single_command_sender_receiver.py @@ -22,8 +22,7 @@ class SingleCommandSenderReceiver(CommandSenderReceiver): This object can be used by instantiating it and calling sendSingleTcAndReceiveTm() """ def __init__(self, comInterface: ComIF_T, tmtcPrinter: TmTcPrinterT, tmListener: TmListenerT, - pusPacketTuple: tuple, tmTimeout: float, tcTimeoutFactor: float, - doPrintToFile: bool): + pusPacketTuple: tuple, tmTimeout: float, tcTimeoutFactor: float): """ :param comInterface: CommunicationInterface object, passed on to CommandSenderReceiver :param tmListener: TmListener object which runs in the background and receives all TM @@ -35,8 +34,8 @@ class SingleCommandSenderReceiver(CommandSenderReceiver): :param doPrintToFile: Specify whether output is also printed to a file """ super().__init__(comInterface=comInterface, tmListener=tmListener, tmtcPrinter=tmtcPrinter, - tmTimeout=tmTimeout, tcSendTimeoutFactor=tcTimeoutFactor, - doPrintToFile=doPrintToFile) + tmTimeout=tmTimeout, tcSendTimeoutFactor=tcTimeoutFactor) + self.faulty_input = False try: self.pus_packet, self.pus_packet_info = pusPacketTuple except TypeError: diff --git a/tc/OBSW_TcService200.py b/tc/OBSW_TcService200.py index 31105dbf455a85f22e1dde942e16f5410306b623..1e2ddf5a4228a3ff0342be52f8b18e77544cddc2 100644 --- a/tc/OBSW_TcService200.py +++ b/tc/OBSW_TcService200.py @@ -13,13 +13,14 @@ Run script with -s <Service or Device> -m 3 with optional -p parameter for file """ from tc.OBSW_TcPacket import PUSTelecommand from tc.OBSW_TcPacker import tcQueueT +import config.OBSW_Config as g import struct def packService200TestInto(tcQueue: tcQueueT) -> tcQueueT: tcQueue.appendleft(("print", "Testing Service 200")) # Object ID: Dummy Device - objectId = bytearray([0x44, 0x00, 0xAF, 0xFE]) + objectId = g.DUMMY_DEVICE_ID # Set On Mode tcQueue.appendleft(("print", "\r\nTesting Service 200: Set Mode On")) modeData = packModeData(objectId, 1, 0)