diff --git a/.idea/runConfigurations/OBSW_UdpClient_Unit_Test_Serial.xml b/.idea/runConfigurations/OBSW_TmTcClient_Unit_Test_Serial.xml similarity index 73% rename from .idea/runConfigurations/OBSW_UdpClient_Unit_Test_Serial.xml rename to .idea/runConfigurations/OBSW_TmTcClient_Unit_Test_Serial.xml index 693c841bf6927126e6a0b3757f0ababf271e641e..3b988241761cf6dc92e2e4b86f0ca3c60f5ed4b9 100644 --- a/.idea/runConfigurations/OBSW_UdpClient_Unit_Test_Serial.xml +++ b/.idea/runConfigurations/OBSW_TmTcClient_Unit_Test_Serial.xml @@ -1,5 +1,5 @@ <component name="ProjectRunConfigurationManager"> - <configuration default="false" name="OBSW_UdpClient Unit Test Serial" type="PythonConfigurationType" factoryName="Python" folderName="Serial Communication"> + <configuration default="false" name="OBSW_TmTcClient Unit Test Serial" type="PythonConfigurationType" factoryName="Python" folderName="Serial Communication"> <module name="tmtc" /> <option name="INTERPRETER_OPTIONS" value="" /> <option name="PARENT_ENVS" value="true" /> @@ -12,8 +12,8 @@ <option name="ADD_CONTENT_ROOTS" value="true" /> <option name="ADD_SOURCE_ROOTS" value="true" /> <EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" /> - <option name="SCRIPT_NAME" value="C:\Users\Robin\NoSyncDokumente\sourceobsw\tmtc\OBSW_TmTcClient.py" /> - <option name="PARAMETERS" value="-m 5 -p -c 1" /> + <option name="SCRIPT_NAME" value="$PROJECT_DIR$/OBSW_TmTcClient.py" /> + <option name="PARAMETERS" value="-m 5 -p -c 1 --COM COM9" /> <option name="SHOW_COMMAND_LINE" value="false" /> <option name="EMULATE_TERMINAL" value="true" /> <option name="MODULE_MODE" value="false" /> diff --git a/.idea/runConfigurations/OBSW_UdpClient_Service_17_Test_Serial.xml b/.idea/runConfigurations/OBSW_TmTc_Client_Service_17_Test_Serial.xml similarity index 77% rename from .idea/runConfigurations/OBSW_UdpClient_Service_17_Test_Serial.xml rename to .idea/runConfigurations/OBSW_TmTc_Client_Service_17_Test_Serial.xml index 52ef5e5306d3774a5bbdeeb7b85da6d6ec1e91a6..0dd68ef49a0a404274a328d196f468549d47e4da 100644 --- a/.idea/runConfigurations/OBSW_UdpClient_Service_17_Test_Serial.xml +++ b/.idea/runConfigurations/OBSW_TmTc_Client_Service_17_Test_Serial.xml @@ -1,5 +1,5 @@ <component name="ProjectRunConfigurationManager"> - <configuration default="false" name="OBSW_UdpClient Service 17 Test Serial" type="PythonConfigurationType" factoryName="Python" folderName="Serial Communication"> + <configuration default="false" name="OBSW_TmTc Client Service 17 Test Serial" type="PythonConfigurationType" factoryName="Python" folderName="Serial Communication"> <module name="tmtc" /> <option name="INTERPRETER_OPTIONS" value="" /> <option name="PARENT_ENVS" value="true" /> @@ -12,7 +12,7 @@ <option name="ADD_CONTENT_ROOTS" value="true" /> <option name="ADD_SOURCE_ROOTS" value="true" /> <EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" /> - <option name="SCRIPT_NAME" value="C:\Users\Robin\NoSyncDokumente\sourceobsw\tmtc\OBSW_TmTcClient.py" /> + <option name="SCRIPT_NAME" value="$PROJECT_DIR$/OBSW_TmTcClient.py" /> <option name="PARAMETERS" value="-m 3 -s 17 -c 1 -p" /> <option name="SHOW_COMMAND_LINE" value="false" /> <option name="EMULATE_TERMINAL" value="true" /> diff --git a/sendreceive/OBSW_MultipleCommandsSenderReceiver.py b/sendreceive/OBSW_MultipleCommandsSenderReceiver.py index 6fcac71d08e03a074a03e1e293b57d9749700e0b..7f4180e02d8252cfd48dbec28ae6b800764c1696 100644 --- a/sendreceive/OBSW_MultipleCommandsSenderReceiver.py +++ b/sendreceive/OBSW_MultipleCommandsSenderReceiver.py @@ -53,7 +53,8 @@ class MultipleCommandSenderReceiver(SequentialCommandSenderReceiver): def sendAllQueue(self): while not self.tcQueue.empty(): if g.comIF == 1: - time.sleep(0.01) # pause could be smaller, but causes overrun error on flashed board + pass + # time.sleep(0.01) # pause could be smaller, but causes overrun error on flashed board self.sendAndPrintTc() def sendAndPrintTc(self): @@ -92,9 +93,9 @@ class MultipleCommandSenderReceiver(SequentialCommandSenderReceiver): def handleLastRepliesListening(self, start_time): elapsed_time_seconds = 0 - while elapsed_time_seconds < self.tmTimeout: + while elapsed_time_seconds < self.tmTimeout/2.0: elapsed_time_seconds = time.time() - start_time - tmReady = self.comInterface.dataAvailable(self.tmTimeout/2.0) + tmReady = self.comInterface.dataAvailable(self.tmTimeout/4.0) if tmReady: self.receiveTelemetryAndStoreInformation() diff --git a/tc/OBSW_TcService3.py b/tc/OBSW_TcService3.py index f8ed0d08137a1bdf2febe8499444c58a664e540e..777d2887540f22c32213c370bc9f3c9aab993284 100644 --- a/tc/OBSW_TcService3.py +++ b/tc/OBSW_TcService3.py @@ -33,21 +33,41 @@ def packService3TestInto(tcQueue): tcQueue.put(("print", "\r\nTesting Service 3: Adding custom diganostics definition")) command = PUSTelecommand(service=3, subservice=2, SSC=3020, data=hkDefinition2) tcQueue.put(command.packCommandTuple()) + # enable custom hk definition tcQueue.put(("print", "\r\nTesting Service 3: Enable custom definition")) command = PUSTelecommand(service=3, subservice=5, SSC=3030, data=sid1) tcQueue.put(command.packCommandTuple()) - # enable gps0 - # tcQueue.put(("print", "\r\nTesting Service 3: Enable GPS definition")) - # command = PUSTelecommand(service=3, subservice=5, SSC=3030, data=sidGps) - # tcQueue.put(command.packCommandTuple()) # enable custom diag definition - # disable custom hk definition - # disable custom diag definition + tcQueue.put(("print", "\r\nTesting Service 3: Enable custom diagnostics definition")) + command = PUSTelecommand(service=3, subservice=7, SSC=3030, data=sid1) + tcQueue.put(command.packCommandTuple()) + # enable gps0 + tcQueue.put(("print", "\r\nTesting Service 3: Enable GPS definition")) + command = PUSTelecommand(service=3, subservice=5, SSC=3030, data=sidGps) + tcQueue.put(command.packCommandTuple()) + + # maybe wait a bit to receive at least 2 packets.. + # Disable custom hk definition + tcQueue.put(("print", "\r\nTesting Service 3: Disable custom definition")) + command = PUSTelecommand(service=3, subservice=6, SSC=3030, data=sid1) + tcQueue.put(command.packCommandTuple()) + # Disable custom diag definition + tcQueue.put(("print", "\r\nTesting Service 3: Disable custom diagnostics definition")) + command = PUSTelecommand(service=3, subservice=8, SSC=3030, data=sid1) + tcQueue.put(command.packCommandTuple()) + # disable gps0 + tcQueue.put(("print", "\r\nTesting Service 3: Disable GPS definition")) + command = PUSTelecommand(service=3, subservice=6, SSC=3030, data=sidGps) + tcQueue.put(command.packCommandTuple()) + # report custom hk definition # report custom diag definition + # report gps0 definition + # generate one custom hk definition # generate one custom diag definition + # generate one gps 0 definition # modify custom hk definition interval # modify custom diag definition interval # report custom hk definition @@ -58,10 +78,7 @@ def packService3TestInto(tcQueue): # report custom diag definition # delete custom hk definition # delete custom diag definition - # disable gps0 - tcQueue.put(("print", "\r\nTesting Service 3: Disable GPS definition")) - command = PUSTelecommand(service=3, subservice=6, SSC=3030, data=sidGps) - tcQueue.put(command.packCommandTuple()) + # tcQueue.put(("print", "\r\nTesting Service 3: Deleting custom HK definition")) # command = PUSTelecommand(service=3, subservice=3, SSC=3080, data=sid1) # tcQueue.put(command.packCommandTuple()) diff --git a/test/OBSW_UnitTest.py b/test/OBSW_UnitTest.py index 15633564beadb25b2f2c7017d9d54024a09a894b..e42e2620682d68414dc7e0e1fb8c0c06718d2dc3 100644 --- a/test/OBSW_UnitTest.py +++ b/test/OBSW_UnitTest.py @@ -178,7 +178,7 @@ class TestService5(TestService): super().setUpClass() print("Testing Service 5") cls.waitIntervals = [1, 2, 3] - cls.waitTime = [1.2, 1.5, 1.5] + cls.waitTime = [1.5, 1.5, 1.5] packService5TestInto(cls.testQueue) def test_Service5(self):