Skip to content
Snippets Groups Projects
Commit 5f422e5b authored by Robin.Mueller's avatar Robin.Mueller
Browse files

gui working again

parent f497a45f
Branches
No related tags found
No related merge requests found
...@@ -61,13 +61,15 @@ def run_tmtc_client(use_gui: bool): ...@@ -61,13 +61,15 @@ def run_tmtc_client(use_gui: bool):
tmtc_handler.initialize() tmtc_handler.initialize()
tmtc_handler.perform_operation() tmtc_handler.perform_operation()
else: else:
tmtc_handler_task = TmTcHandler.prepare_tmtc_handler_start() tmtc_gui = TmTcFrontend()
tmtc_frontend = TmTcFrontend() tmtc_gui.start_ui()
tmtc_frontend_task = tmtc_frontend.prepare_start(tmtc_frontend) # tmtc_handler_task = TmTcHandler.prepare_tmtc_handler_start()
tmtc_frontend_task.start() # tmtc_frontend = TmTcFrontend()
tmtc_handler_task.start() # tmtc_frontend_task = tmtc_frontend.prepare_start(tmtc_frontend)
tmtc_handler_task.join() # tmtc_frontend_task.start()
tmtc_frontend_task.join() # tmtc_handler_task.start()
# tmtc_handler_task.join()
# tmtc_frontend_task.join()
...@@ -40,7 +40,8 @@ class TmTcFrontend: ...@@ -40,7 +40,8 @@ class TmTcFrontend:
is_busy: bool is_busy: bool
def __init__(self): def __init__(self):
# self.tmtc_handler = tmtc_handler self.tmtc_handler = TmTcHandler()
self.tmtc_handler.initialize()
obsw_config.G_SERVICE = 17 obsw_config.G_SERVICE = 17
obsw_config.G_COM_IF = obsw_config.ComInterfaces.QEMU obsw_config.G_COM_IF = obsw_config.ComInterfaces.QEMU
...@@ -63,7 +64,7 @@ class TmTcFrontend: ...@@ -63,7 +64,7 @@ class TmTcFrontend:
def start_service_test_clicked(self): def start_service_test_clicked(self):
LOGGER.info("start service test button pressed") LOGGER.info("start service test button pressed")
LOGGER.info("start testing service: " + str(obsw_config.G_SERVICE)) 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 # start the action in a new process
p = threading.Thread(target=self.handle_tm_tc_action) p = threading.Thread(target=self.handle_tm_tc_action)
p.start() p.start()
...@@ -88,9 +89,9 @@ class TmTcFrontend: ...@@ -88,9 +89,9 @@ class TmTcFrontend:
command = PusTelecommand( command = PusTelecommand(
service=self.single_command_service, subservice=self.single_command_sub_service, service=self.single_command_service, subservice=self.single_command_sub_service,
ssc=self.single_command_ssc) 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 # start the action in a new process
p = threading.Thread(target=self.handle_tm_tc_action) p = threading.Thread(target=self.handle_tm_tc_action)
p.start() p.start()
...@@ -99,7 +100,7 @@ class TmTcFrontend: ...@@ -99,7 +100,7 @@ class TmTcFrontend:
LOGGER.info("start tmtc_handler.handle_action") LOGGER.info("start tmtc_handler.handle_action")
self.is_busy = True self.is_busy = True
self.set_send_buttons(False) self.set_send_buttons(False)
self.tmtc_handler.__handle_action() self.tmtc_handler.perform_operation()
self.is_busy = False self.is_busy = False
self.set_send_buttons(True) self.set_send_buttons(True)
LOGGER.info("finished tmtc_handler.handle_action") LOGGER.info("finished tmtc_handler.handle_action")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment