From 4df22ee2267607766ee439e49ef49ab51b40ad88 Mon Sep 17 00:00:00 2001
From: "Robin.Mueller" <robin.mueller.m@gmail.com>
Date: Fri, 26 Jun 2020 12:45:04 +0200
Subject: [PATCH] printout moved to sender component

---
 sendreceive/obsw_multiple_commands_sender_receiver.py | 2 ++
 test/obsw_module_test.py                              | 8 ++++----
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/sendreceive/obsw_multiple_commands_sender_receiver.py b/sendreceive/obsw_multiple_commands_sender_receiver.py
index 7c8bfd7..274204c 100644
--- a/sendreceive/obsw_multiple_commands_sender_receiver.py
+++ b/sendreceive/obsw_multiple_commands_sender_receiver.py
@@ -58,6 +58,8 @@ class MultipleCommandSenderReceiver(SequentialCommandSenderReceiver):
             self.wait_for_last_replies_listening(self._tm_timeout / 1.4)
             # Get a copy of the queue, otherwise we will lose the data.
             tm_packet_queue_list = self._tm_listener.retrieve_tm_packet_queue().copy()
+            if g.G_PRINT_TM:
+                self.print_tm_queue(self._tm_listener.retrieve_tm_packet_queue())
             self._tm_listener.clear_tm_packet_queue()
             self._tm_listener.event_mode_op_finished.set()
             if g.G_PRINT_TO_FILE:
diff --git a/test/obsw_module_test.py b/test/obsw_module_test.py
index 6cb4d37..9c1f468 100644
--- a/test/obsw_module_test.py
+++ b/test/obsw_module_test.py
@@ -4,9 +4,11 @@
 @brief  Module/High-Level test of on-board software, used by the TMTC client in
         software test mode.
 @details
+Supply --np to suppress output of TM, ommit for debugging!
+
 It is very difficult to execute Unit Tests on embedded hardware.
-The most significant functonalities for satellites are commanding and TM reception.
-As such, these functionalities will be tested by sending TCs and checking the expected Telemetry.
+The most significant software components for satellites are commanding and TM reception.
+As such, these components will be tested by sending TCs and checking the expected Telemetry.
 Still, we make use of the Unit Testing Framework provided by Python (with some hacks involved).
 
 @manual
@@ -39,7 +41,6 @@ from enum import Enum
 from abc import abstractmethod
 from collections import deque
 from typing import Deque
-import pprint
 
 from config import obsw_config as g
 from tc.obsw_pus_tc_packer import pack_dummy_device_test_into
@@ -136,7 +137,6 @@ class TestService(unittest.TestCase):
         tm_packet_queue = deque()
         try:
             (tc_info_queue, tm_packet_queue) = module_tester.send_tc_queue_and_return_info()
-            module_tester.print_tm_queue(tm_packet_queue)
         except (IOError, KeyboardInterrupt):
             LOGGER.info("Closing TMTC Handler")
         tm_info_queue = deque()
-- 
GitLab