From 3a5cc819095aa5a64c399e1141e8034001a1ee4e Mon Sep 17 00:00:00 2001 From: "Robin.Mueller" <robin.mueller.m@gmail.com> Date: Sat, 31 Oct 2020 02:40:45 +0100 Subject: [PATCH] problem with backend/ multiprocessing --- core/tmtc_backend.py | 2 +- core/tmtc_client_core.py | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/core/tmtc_backend.py b/core/tmtc_backend.py index 24a6f31..322e7a1 100644 --- a/core/tmtc_backend.py +++ b/core/tmtc_backend.py @@ -65,7 +65,7 @@ class TmTcHandler: if self.mode == g.ModeList.Idle: LOGGER.info("TMTC Client in idle mode") time.sleep(5) - if self.mode == g.ModeList.ListenerMode: + elif self.mode == g.ModeList.ListenerMode: time.sleep(1) except KeyboardInterrupt: LOGGER.info("Closing TMTC client.") diff --git a/core/tmtc_client_core.py b/core/tmtc_client_core.py index 608507f..70dcffe 100755 --- a/core/tmtc_client_core.py +++ b/core/tmtc_client_core.py @@ -56,16 +56,17 @@ def run_tmtc_client(use_gui: bool): else: tmtc_handler = TmTcHandler(g.G_MODE_ID) - tmtc_handler_task = tmtc_handler.prepare_start() + # tmtc_handler_task = tmtc_handler.prepare_start() tmtc_frontend_task = Process() if use_gui: tmtc_frontend = TmTcFrontend(tmtc_handler) tmtc_frontend_task = tmtc_frontend.prepare_start() tmtc_frontend_task.start() - tmtc_handler_task.start() + # tmtc_handler_task.start() + tmtc_handler.perform_operation() - tmtc_handler_task.join() + # tmtc_handler_task.join() if use_gui: tmtc_frontend_task.join() -- GitLab