From 53948b8093e0a62e20f2efb135988b9df6e1b625 Mon Sep 17 00:00:00 2001 From: "Robin.Mueller" <robin.mueller.m@gmail.com> Date: Sat, 31 Oct 2020 01:27:35 +0100 Subject: [PATCH] testing processes --- core/tmtc_client_core.py | 18 +++++++----------- core/tmtc_frontend.py | 27 ++++++++------------------- 2 files changed, 15 insertions(+), 30 deletions(-) diff --git a/core/tmtc_client_core.py b/core/tmtc_client_core.py index 296ab08..a3ce3bc 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 ca4d2fd..098f358 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): -- GitLab