diff --git a/core/tmtc_client_core.py b/core/tmtc_client_core.py index c3f46ba6459c4e5c823e05a9065571a4ebef3bd0..08b93b1296755014784b019de34c275ae927ead7 100755 --- a/core/tmtc_client_core.py +++ b/core/tmtc_client_core.py @@ -61,13 +61,15 @@ def run_tmtc_client(use_gui: bool): tmtc_handler.initialize() tmtc_handler.perform_operation() else: - tmtc_handler_task = TmTcHandler.prepare_tmtc_handler_start() - tmtc_frontend = TmTcFrontend() - tmtc_frontend_task = tmtc_frontend.prepare_start(tmtc_frontend) - tmtc_frontend_task.start() - tmtc_handler_task.start() - tmtc_handler_task.join() - tmtc_frontend_task.join() + tmtc_gui = TmTcFrontend() + tmtc_gui.start_ui() + # tmtc_handler_task = TmTcHandler.prepare_tmtc_handler_start() + # tmtc_frontend = TmTcFrontend() + # tmtc_frontend_task = tmtc_frontend.prepare_start(tmtc_frontend) + # tmtc_frontend_task.start() + # tmtc_handler_task.start() + # tmtc_handler_task.join() + # tmtc_frontend_task.join() diff --git a/core/tmtc_frontend.py b/core/tmtc_frontend.py index 77cf71f178de5eb2988966d941d3414d29b9666c..663f738e8f486e4782ab672e4b33abdb959057f3 100644 --- a/core/tmtc_frontend.py +++ b/core/tmtc_frontend.py @@ -40,7 +40,8 @@ class TmTcFrontend: is_busy: bool def __init__(self): - # self.tmtc_handler = tmtc_handler + self.tmtc_handler = TmTcHandler() + self.tmtc_handler.initialize() obsw_config.G_SERVICE = 17 obsw_config.G_COM_IF = obsw_config.ComInterfaces.QEMU @@ -63,7 +64,7 @@ class TmTcFrontend: def start_service_test_clicked(self): LOGGER.info("start service test button pressed") LOGGER.info("start testing service: " + str(obsw_config.G_SERVICE)) - # self.tmtc_handler.mode = obsw_config.ModeList.ServiceTestMode + self.tmtc_handler.mode = obsw_config.ModeList.ServiceTestMode # start the action in a new process p = threading.Thread(target=self.handle_tm_tc_action) p.start() @@ -88,9 +89,9 @@ class TmTcFrontend: command = PusTelecommand( service=self.single_command_service, subservice=self.single_command_sub_service, ssc=self.single_command_ssc) - # self.tmtc_handler.single_command_package = command.pack_command_tuple() + self.tmtc_handler.single_command_package = command.pack_command_tuple() - # self.tmtc_handler.mode = obsw_config.ModeList.SingleCommandMode + self.tmtc_handler.mode = obsw_config.ModeList.SingleCommandMode # start the action in a new process p = threading.Thread(target=self.handle_tm_tc_action) p.start() @@ -99,7 +100,7 @@ class TmTcFrontend: LOGGER.info("start tmtc_handler.handle_action") self.is_busy = True self.set_send_buttons(False) - self.tmtc_handler.__handle_action() + self.tmtc_handler.perform_operation() self.is_busy = False self.set_send_buttons(True) LOGGER.info("finished tmtc_handler.handle_action")