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
3bb6a22d
Commit
3bb6a22d
authored
4 years ago
by
Robin Mueller
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' into mueller/master
parents
d88d43bb
320cb194
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
SOURCEbadge.png
+0
-0
0 additions, 0 deletions
SOURCEbadge.png
core/tmtc_client_core.py
+7
-0
7 additions, 0 deletions
core/tmtc_client_core.py
core/tmtc_frontend.py
+16
-6
16 additions, 6 deletions
core/tmtc_frontend.py
with
23 additions
and
6 deletions
SOURCEbadge.png
0 → 100644
+
0
−
0
View file @
3bb6a22d
313 KiB
This diff is collapsed.
Click to expand it.
core/tmtc_client_core.py
+
7
−
0
View file @
3bb6a22d
...
...
@@ -25,7 +25,11 @@ limitations under the License.
@manual
Run this file with the -h flag to display options.
"""
import
sys
from
multiprocessing
import
Process
from
PyQt5.QtWidgets
import
QApplication
from
tmtc_core.utility.obsw_logger
import
set_tmtc_logger
,
get_logger
from
config.obsw_config
import
set_globals
...
...
@@ -61,8 +65,11 @@ def run_tmtc_client(use_gui: bool):
tmtc_handler
.
initialize
()
tmtc_handler
.
perform_operation
()
else
:
app
=
QApplication
([
"
TMTC Commander
"
])
tmtc_gui
=
TmTcFrontend
()
tmtc_gui
.
start_ui
()
sys
.
exit
(
app
.
exec_
())
# tmtc_handler_task = TmTcHandler.prepare_tmtc_handler_start()
# tmtc_frontend = TmTcFrontend()
# tmtc_frontend_task = tmtc_frontend.prepare_start(tmtc_frontend)
...
...
This diff is collapsed.
Click to expand it.
core/tmtc_frontend.py
+
16
−
6
View file @
3bb6a22d
...
...
@@ -10,6 +10,8 @@
from
multiprocessing
import
Process
from
PyQt5.QtWidgets
import
*
from
PyQt5.QtGui
import
QPixmap
,
QIcon
import
sys
from
core.tmtc_backend
import
TmTcHandler
from
tmtc_core.tc.obsw_pus_tc_base
import
PusTelecommand
from
tmtc_core.utility.obsw_logger
import
get_logger
...
...
@@ -23,7 +25,8 @@ LOGGER = get_logger()
TODO: Make it look nicer. Add SOURCE or KSat logo.
"""
class
TmTcFrontend
:
class
TmTcFrontend
(
QMainWindow
):
# TODO: this list should probably be inside an enum in the obsw_config.py
serviceList
=
[
2
,
3
,
5
,
8
,
9
,
17
,
20
,
200
,
"
Dummy
"
,
"
GPS0
"
,
"
GPS1
"
]
# , "Error"]
...
...
@@ -40,6 +43,7 @@ class TmTcFrontend:
is_busy
:
bool
def
__init__
(
self
):
super
(
TmTcFrontend
,
self
).
__init__
()
self
.
tmtc_handler
=
TmTcHandler
()
# TODO: Perform initialization on button press with specified ComIF
# Also, when changing ComIF, ensure that old ComIF is closed (e.g. with printout)
...
...
@@ -113,11 +117,18 @@ class TmTcFrontend:
self
.
single_command_button
.
setEnabled
(
state
)
def
start_ui
(
self
):
app
=
QApplication
([])
win
=
QWidget
()
win
=
QWidget
(
self
)
self
.
setCentralWidget
(
win
)
grid
=
QGridLayout
()
self
.
setWindowTitle
(
"
TMTC Commander
"
)
label
=
QLabel
(
self
)
pixmap
=
QPixmap
(
"
SOURCEbadge.png
"
)
# QPixmap is the class, easy to put pic on screen
label
.
setGeometry
(
720
,
15
,
110
,
110
)
label
.
setPixmap
(
pixmap
)
self
.
setWindowIcon
(
QIcon
(
"
SOURCEbadge.png
"
));
label
.
setScaledContents
(
True
)
row
=
0
grid
.
addWidget
(
QLabel
(
"
Configuration:
"
),
row
,
0
,
1
,
2
)
row
+=
1
...
...
@@ -284,14 +295,13 @@ class TmTcFrontend:
row
+=
1
win
.
setLayout
(
grid
)
win
.
resize
(
900
,
800
)
win
.
show
()
self
.
resize
(
900
,
800
)
self
.
show
()
# resize table columns to fill the window width
#for i in range(0, 5):
# self.commandTable.setColumnWidth(i, int(self.commandTable.width() / 5) - 3)
app
.
exec_
()
class
SingleCommandTable
(
QTableWidget
):
def
__init__
(
self
):
...
...
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