diff --git a/.idea/runConfigurations/OBSW_TmTcClient_GUI.xml b/.idea/runConfigurations/OBSW_TmTcClient_GUI.xml index ad057809e1194c668ac2d92a40e240ae4cc9077e..571fa9aa2fbe026458906f0fd04b1c0c78ad3038 100644 --- a/.idea/runConfigurations/OBSW_TmTcClient_GUI.xml +++ b/.idea/runConfigurations/OBSW_TmTcClient_GUI.xml @@ -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_tmtc_client.py" /> + <option name="SCRIPT_NAME" value="$PROJECT_DIR$/obsw_tmtc_client.py" /> <option name="PARAMETERS" value="-m 0" /> <option name="SHOW_COMMAND_LINE" value="false" /> <option name="EMULATE_TERMINAL" value="false" /> diff --git a/config/obsw_config.py b/config/obsw_config.py index 16da60abe9b4704130451954b80407c2cb39be89..83c2edd08a969e763f0671b48ffcdd8c5d10d6a4 100644 --- a/config/obsw_config.py +++ b/config/obsw_config.py @@ -10,6 +10,7 @@ import enum import struct import pprint from typing import Tuple +import logging """ Global service_type definitions @@ -64,7 +65,7 @@ All global variables, set in main program with arg parser G_TMTC_LOGGER_NAME = "TMTC Logger" G_ERROR_LOG_FILE_NAME = "tmtc_error.log" G_PP = pprint.PrettyPrinter() - +LOGGER = logging.getLogger(G_TMTC_LOGGER_NAME) # General Settings G_SCRIPT_MODE = 1 G_MODE_ID = 0 @@ -105,7 +106,7 @@ def set_globals(args): G_COM_IF, G_COM_PORT, G_SERIAL_TIMEOUT, G_TM_TIMEOUT, G_TC_SEND_TIMEOUT_FACTOR, \ G_PRINT_TO_FILE, G_PRINT_HK_DATA, G_PRINT_RAW_TM, G_PRINT_TM if args.mode == 0: - print("GUI mode not implemented yet !") + LOGGER.info("GUI mode not implemented yet !") if args.shortDisplayMode: G_DISPLAY_MODE = "short" else: diff --git a/gui/obsw_tmtc_gui.py b/gui/obsw_tmtc_gui.py index 7bf34bc2510bbaae1e88b8b66076cadbbea45b4f..639dae2d98426070502d48d1cbcf3b151182f763 100644 --- a/gui/obsw_tmtc_gui.py +++ b/gui/obsw_tmtc_gui.py @@ -16,8 +16,10 @@ import tkinter as tk from multiprocessing.connection import Client from multiprocessing import Process +from utility.obsw_logger import get_logger 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. @@ -27,7 +29,7 @@ import time # include a really nice source badge and make it large ! # plan this on paper first... # Step 1: Huge Mission Badge in Tkinter window because that is cool. -# Step 2: Simple buttons to run G_SERVICE test around the badge. +# Step 2: Simple buttons to run servce tests around the badge. class TmTcGUI(Process): def __init__(self): super(TmTcGUI, self).__init__() @@ -40,7 +42,7 @@ class TmTcGUI(Process): self.open() def open(self): - self.root = tk.Tk("Hallo Welt !") + self.root = tk.Tk() self.root.title("Hallo Welt") while True: self.conn.send("test")