Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SRC OBDH TMTC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Robin Mueller
SRC OBDH TMTC
Commits
5f422e5b
Commit
5f422e5b
authored
4 years ago
by
Robin.Mueller
Browse files
Options
Downloads
Patches
Plain Diff
gui working again
parent
f497a45f
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
core/tmtc_client_core.py
+9
-7
9 additions, 7 deletions
core/tmtc_client_core.py
core/tmtc_frontend.py
+6
-5
6 additions, 5 deletions
core/tmtc_frontend.py
with
15 additions
and
12 deletions
core/tmtc_client_core.py
+
9
−
7
View file @
5f422e5b
...
@@ -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()
This diff is collapsed.
Click to expand it.
core/tmtc_frontend.py
+
6
−
5
View file @
5f422e5b
...
@@ -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_ac
tion
()
self
.
tmtc_handler
.
perform_opera
tion
()
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
"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment