diff --git a/core/tmtc_client_core.py b/core/tmtc_client_core.py index 296ab082193567d9c31698a9444734109294ac86..a3ce3bc0af38a77632aa327cedee7291a050e595 100755 --- a/core/tmtc_client_core.py +++ b/core/tmtc_client_core.py @@ -54,22 +54,18 @@ def run_tmtc_client(use_gui: bool): LOGGER.info("Starting TMTC Handler") tmtc_handler = TmTcHandler() - if use_gui: - LOGGER.info("Starting TMTC GUI") - tmtc_frontend = TmTcFrontend(tmtc_handler) - frontend_process = Process(target=tmtc_frontend.init_ui()) - frontend_process.start() - tmtc_handler.start() + start_with_gui(tmtc_handler) else: tmtc_handler.start() - # At some later point, the program will run permanently and be able to take commands. - # For now we put a permanent loop here so the program - # doesn't exit automatically (TM Listener is daemonic) - while True: - pass +def start_with_gui(tmtc_handler: TmTcHandler): + LOGGER.info("Starting TMTC GUI") + tmtc_frontend = TmTcFrontend(tmtc_handler) + frontend_process = Process(target=tmtc_frontend.init_ui()) + frontend_process.start() + tmtc_handler.start() diff --git a/core/tmtc_frontend.py b/core/tmtc_frontend.py index ca4d2fd0a58b2c9031bec6ec3dafb5ec0b9b50fe..098f3583f6392ed5c6b38e44c4ffd6b1199fa870 100644 --- a/core/tmtc_frontend.py +++ b/core/tmtc_frontend.py @@ -1,15 +1,11 @@ #!/usr/bin/python3.7 """ -@file tmtc_frontend.py -@date - 01.11.2019 -@brief - This is part of the TMTC client developed by the SOURCE project by KSat -@description - GUI Testing for TMTC client +@file tmtc_frontend.py +@date 01.11.2019 +@brief This is part of the TMTC client developed by the SOURCE project by KSat +@description GUI Testing for TMTC client @manual -@author: - R. Mueller +@author R. Mueller """ from multiprocessing import Process @@ -22,16 +18,9 @@ import threading 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) -# To start the program, another button with start needs to be set up. -# A third button to perform a keyboard interrupt should be implemented -# 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 servce tests around the badge. +""" +TODO: Make it look nicer. Add SOURCE or KSat logo. +""" class SingleCommandTable(QTableWidget): def __init__(self):