From 22eb182e2afa915ab6a58865808140ad14f0dd61 Mon Sep 17 00:00:00 2001
From: "Robin.Mueller" <robin.mueller.m@gmail.com>
Date: Mon, 12 Oct 2020 11:50:05 +0200
Subject: [PATCH] form corrections

---
 gui/obsw_tmtc_gui.py            |  1 +
 tc/obsw_pus_tc_frame_packer.py  |  2 +-
 tc/obsw_tc_gps.py               |  1 +
 tc/obsw_tc_service20.py         | 61 ++++++++++++++++-----------------
 tc/obsw_tc_service9.py          |  2 +-
 tm/obsw_pus_tm_factory_hook.py  |  2 +-
 tm/obsw_tm_service_3.py         |  4 +--
 tmtc_core                       |  2 +-
 utility/obsw_binary_uploader.py |  2 +-
 9 files changed, 38 insertions(+), 39 deletions(-)

diff --git a/gui/obsw_tmtc_gui.py b/gui/obsw_tmtc_gui.py
index 8c322d5..5c4ba4c 100644
--- a/gui/obsw_tmtc_gui.py
+++ b/gui/obsw_tmtc_gui.py
@@ -21,6 +21,7 @@ import time
 
 LOGGER = get_logger()
 
+
 # A first simple version has drop down menus to chose all necessary options
 # which are normally handled by the args parser.
 # when pressing save, all chosen values get passed to the globals file (OBSW_Config)
diff --git a/tc/obsw_pus_tc_frame_packer.py b/tc/obsw_pus_tc_frame_packer.py
index 71d045f..12447d3 100644
--- a/tc/obsw_pus_tc_frame_packer.py
+++ b/tc/obsw_pus_tc_frame_packer.py
@@ -49,4 +49,4 @@ def pack_tc_info(tc_list: List[PusTelecommand]) -> List[PusTcInfo]:
     tc_info_list = list()
     for tc in tc_list:
         tc_info_list.append(tc.pack_information())
-    return tc_info_list
\ No newline at end of file
+    return tc_info_list
diff --git a/tc/obsw_tc_gps.py b/tc/obsw_tc_gps.py
index 9d9e1eb..1a047bf 100644
--- a/tc/obsw_tc_gps.py
+++ b/tc/obsw_tc_gps.py
@@ -11,6 +11,7 @@ from tc.obsw_tc_service2 import pack_mode_data
 
 import config.obsw_config as g
 
+
 def pack_gps_test_into(object_id: bytearray, tc_queue: TcQueueT) -> TcQueueT:
     if object_id == g.GPS0_DEVICE_ID:
         gps_string = "GPS0"
diff --git a/tc/obsw_tc_service20.py b/tc/obsw_tc_service20.py
index 1b316d6..24ce024 100644
--- a/tc/obsw_tc_service20.py
+++ b/tc/obsw_tc_service20.py
@@ -14,7 +14,7 @@ from tc.obsw_tc_service200 import pack_mode_data
 
 
 def pack_service20_test_into(tc_queue: Deque, called_externally: bool = False) -> Deque:
-    #parameter IDs
+    # parameter IDs
     parameterID0 = 0
     parameterID1 = 1
     parameterID2 = 2
@@ -29,33 +29,33 @@ def pack_service20_test_into(tc_queue: Deque, called_externally: bool = False) -
     command = PusTelecommand(service=200, subservice=1, ssc=2000, app_data=mode_data)
     tc_queue.appendleft(command.pack_command_tuple())
 
-    #test invalid subservice
-    #use subservice 130 for invalid subservice check, as this is in use for dump reply
-    #(and therefore will never be a valid subservice)
-    #tc_queue.appendleft(("print", "Testing Service 20: Invalid subservice"))
-    #mode_data = pack_mode_data(object_id, 2, 0)
-    #command = PusTelecommand(service=20, subservice=130, ssc=810, app_data=mode_data)
-    #tc_queue.appendleft(command.pack_command_tuple())
-
-    #test invalid objectid //TODO: do we have an objectid known to be empty (even in future)?
-    #tc_queue.appendleft(("print", "Testing Service 20: Invalid object ID"))
-    #mode_data = pack_mode_data(object_id, 2, 0)
-    #command = PusTelecommand(service=20, subservice=128, ssc=810, app_data=mode_data)
-    #tc_queue.appendleft(command.pack_command_tuple())
-
-    #test invalid parameterID for load
-    #tc_queue.appendleft(("print", "Testing Service 20: Invalid parameter ID for load"))
-    #mode_data = pack_mode_data(object_id, 2, 0)
-    #command = PusTelecommand(service=20, subservice=128, ssc=810, app_data=mode_data)
-    #tc_queue.appendleft(command.pack_command_tuple())
-
-    #test invalid parameterID for dump
-    #tc_queue.appendleft(("print", "Testing Service 20: Invalid parameter ID for dump"))
-    #mode_data = pack_mode_data(object_id, 2, 0)
-    #command = PusTelecommand(service=20, subservice=129, ssc=810, app_data=mode_data)
-    #tc_queue.appendleft(command.pack_command_tuple())
-
-    #test checking Load for uint32_t
+    # test invalid subservice
+    # use subservice 130 for invalid subservice check, as this is in use for dump reply
+    # (and therefore will never be a valid subservice)
+    # tc_queue.appendleft(("print", "Testing Service 20: Invalid subservice"))
+    # mode_data = pack_mode_data(object_id, 2, 0)
+    # command = PusTelecommand(service=20, subservice=130, ssc=810, app_data=mode_data)
+    # tc_queue.appendleft(command.pack_command_tuple())
+
+    # test invalid objectid //TODO: do we have an objectid known to be empty (even in future)?
+    # tc_queue.appendleft(("print", "Testing Service 20: Invalid object ID"))
+    # mode_data = pack_mode_data(object_id, 2, 0)
+    # command = PusTelecommand(service=20, subservice=128, ssc=810, app_data=mode_data)
+    # tc_queue.appendleft(command.pack_command_tuple())
+
+    # test invalid parameterID for load
+    # tc_queue.appendleft(("print", "Testing Service 20: Invalid parameter ID for load"))
+    # mode_data = pack_mode_data(object_id, 2, 0)
+    # command = PusTelecommand(service=20, subservice=128, ssc=810, app_data=mode_data)
+    # tc_queue.appendleft(command.pack_command_tuple())
+
+    # test invalid parameterID for dump
+    # tc_queue.appendleft(("print", "Testing Service 20: Invalid parameter ID for dump"))
+    # mode_data = pack_mode_data(object_id, 2, 0)
+    # command = PusTelecommand(service=20, subservice=129, ssc=810, app_data=mode_data)
+    # tc_queue.appendleft(command.pack_command_tuple())
+
+    # test checking Load for uint32_t
     tc_queue.appendleft(("print", "Testing Service 20: Load uint32_t"))
     parameter_id = struct.pack(">I", parameterID0)
     parameter_data = struct.pack(">I", 42)
@@ -63,7 +63,7 @@ def pack_service20_test_into(tc_queue: Deque, called_externally: bool = False) -
     command = PusTelecommand(service=20, subservice=128, ssc=2001, app_data=payload)
     tc_queue.appendleft(command.pack_command_tuple())
 
-    #test checking Dump for uint32_t
+    # test checking Dump for uint32_t
     tc_queue.appendleft(("print", "Testing Service 20: Dump uint32_t"))
     parameter_id = struct.pack(">I", parameterID0)
     payload = object_id + parameter_id
@@ -101,9 +101,6 @@ def pack_service20_test_into(tc_queue: Deque, called_externally: bool = False) -
     tc_queue.appendleft(command.pack_command_tuple())
 """
 
-
-
-
 """
     # set mode on
     tc_queue.appendleft(("print", "Testing Service 8: Set On Mode"))
diff --git a/tc/obsw_tc_service9.py b/tc/obsw_tc_service9.py
index 507b57f..7970b0e 100644
--- a/tc/obsw_tc_service9.py
+++ b/tc/obsw_tc_service9.py
@@ -36,4 +36,4 @@ def pack_service9_test_into(tc_queue: TcQueueT) -> TcQueueT:
     tc_queue.appendleft(command.pack_command_tuple())
     # TODO: Add other time formats here
     tc_queue.appendleft(("export", "log/tmtc_log_service9.txt"))
-    return tc_queue
\ No newline at end of file
+    return tc_queue
diff --git a/tm/obsw_pus_tm_factory_hook.py b/tm/obsw_pus_tm_factory_hook.py
index 29ec55a..6effae1 100644
--- a/tm/obsw_pus_tm_factory_hook.py
+++ b/tm/obsw_pus_tm_factory_hook.py
@@ -144,4 +144,4 @@ class Service200TM(PusTelemetry):
         elif self.isModeReply:
             array.append("Mode")
             array.append("Submode")
-        return
\ No newline at end of file
+        return
diff --git a/tm/obsw_tm_service_3.py b/tm/obsw_tm_service_3.py
index 96be122..ddb4376 100644
--- a/tm/obsw_tm_service_3.py
+++ b/tm/obsw_tm_service_3.py
@@ -122,8 +122,8 @@ class Service3TM(PusTelemetry):
         # TODO: size check. sth not right with gps 0 test
         self.number_of_parameters = 9
         self.hk_header = ["Fix Mode", "SV in Fix", "GNSS Week", "Time of Week", "Latitude",
-                         "Longitude", "Mean Sea Altitude", "Position X", "Position Y", "Position Z",
-                         "Velocity X", "Velocity Y", "Velocity Z"]
+                          "Longitude", "Mean Sea Altitude", "Position X", "Position Y",
+                          "Position Z", "Velocity X", "Velocity Y", "Velocity Z"]
         fix_mode = self._tm_data[4]
         sv_in_fix = self._tm_data[5]
         gnss_week = struct.unpack('>H', self._tm_data[6:8])[0]
diff --git a/tmtc_core b/tmtc_core
index f082c48..6ba9b0f 160000
--- a/tmtc_core
+++ b/tmtc_core
@@ -1 +1 @@
-Subproject commit f082c488cd363308cf6f92c190397a14036341b3
+Subproject commit 6ba9b0f69ab030837ceb6e8c8833e0c71b1dd00a
diff --git a/utility/obsw_binary_uploader.py b/utility/obsw_binary_uploader.py
index d8f6d89..7f27a9e 100644
--- a/utility/obsw_binary_uploader.py
+++ b/utility/obsw_binary_uploader.py
@@ -19,7 +19,7 @@ import config.obsw_config as g
 from tmtc_core.utility.obsw_tmtc_printer import TmTcPrinter, DisplayMode
 from tmtc_core.utility.obsw_logger import get_logger
 from tmtc_core.sendreceive.obsw_tm_listener import TmListener
-from tmtc_core.tm.obsw_pus_tm_factory import PusTelemetryFactory, PusTmQueueT
+from tmtc_core.tm.obsw_pus_tm_factory import PusTmQueueT
 
 LOGGER = get_logger()
 
-- 
GitLab