Skip to content
Snippets Groups Projects
Commit 16378f81 authored by Robin Mueller's avatar Robin Mueller
Browse files

gui fix

parent bfbe0bc9
No related branches found
No related tags found
No related merge requests found
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<option name="ADD_CONTENT_ROOTS" value="true" /> <option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" /> <option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" /> <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="PARAMETERS" value="-m 0" />
<option name="SHOW_COMMAND_LINE" value="false" /> <option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" /> <option name="EMULATE_TERMINAL" value="false" />
......
...@@ -10,6 +10,7 @@ import enum ...@@ -10,6 +10,7 @@ import enum
import struct import struct
import pprint import pprint
from typing import Tuple from typing import Tuple
import logging
""" """
Global service_type definitions Global service_type definitions
...@@ -64,7 +65,7 @@ All global variables, set in main program with arg parser ...@@ -64,7 +65,7 @@ All global variables, set in main program with arg parser
G_TMTC_LOGGER_NAME = "TMTC Logger" G_TMTC_LOGGER_NAME = "TMTC Logger"
G_ERROR_LOG_FILE_NAME = "tmtc_error.log" G_ERROR_LOG_FILE_NAME = "tmtc_error.log"
G_PP = pprint.PrettyPrinter() G_PP = pprint.PrettyPrinter()
LOGGER = logging.getLogger(G_TMTC_LOGGER_NAME)
# General Settings # General Settings
G_SCRIPT_MODE = 1 G_SCRIPT_MODE = 1
G_MODE_ID = 0 G_MODE_ID = 0
...@@ -105,7 +106,7 @@ def set_globals(args): ...@@ -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_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 G_PRINT_TO_FILE, G_PRINT_HK_DATA, G_PRINT_RAW_TM, G_PRINT_TM
if args.mode == 0: if args.mode == 0:
print("GUI mode not implemented yet !") LOGGER.info("GUI mode not implemented yet !")
if args.shortDisplayMode: if args.shortDisplayMode:
G_DISPLAY_MODE = "short" G_DISPLAY_MODE = "short"
else: else:
......
...@@ -16,8 +16,10 @@ ...@@ -16,8 +16,10 @@
import tkinter as tk import tkinter as tk
from multiprocessing.connection import Client from multiprocessing.connection import Client
from multiprocessing import Process from multiprocessing import Process
from utility.obsw_logger import get_logger
import time import time
LOGGER = get_logger()
# A first simple version has drop down menus to chose all necessary options # A first simple version has drop down menus to chose all necessary options
# which are normally handled by the args parser. # which are normally handled by the args parser.
...@@ -27,7 +29,7 @@ import time ...@@ -27,7 +29,7 @@ import time
# include a really nice source badge and make it large ! # include a really nice source badge and make it large !
# plan this on paper first... # plan this on paper first...
# Step 1: Huge Mission Badge in Tkinter window because that is cool. # 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): class TmTcGUI(Process):
def __init__(self): def __init__(self):
super(TmTcGUI, self).__init__() super(TmTcGUI, self).__init__()
...@@ -40,7 +42,7 @@ class TmTcGUI(Process): ...@@ -40,7 +42,7 @@ class TmTcGUI(Process):
self.open() self.open()
def open(self): def open(self):
self.root = tk.Tk("Hallo Welt !") self.root = tk.Tk()
self.root.title("Hallo Welt") self.root.title("Hallo Welt")
while True: while True:
self.conn.send("test") self.conn.send("test")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment