diff --git a/core/tmtc_frontend.py b/core/tmtc_frontend.py index c92c76f410bf208607b68b4ddd8098e7c24c984b..9a5908a2cc24732126de974caf32f2df8df9480c 100644 --- a/core/tmtc_frontend.py +++ b/core/tmtc_frontend.py @@ -41,6 +41,9 @@ class TmTcFrontend: def __init__(self): 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) + # Lock all other elements while ComIF is invalid. self.tmtc_handler.initialize() obsw_config.G_SERVICE = 17 obsw_config.G_COM_IF = obsw_config.ComInterfaces.QEMU @@ -148,16 +151,18 @@ class TmTcFrontend: grid.addWidget(checkbox_short, row, 0, 1, 1) row += 1 - grid.addWidget(QLabel("tm timeout:"), row, 0, 1, 1) - grid.addWidget(QLabel("tm timeout factor:"), row, 1, 1, 1) + grid.addWidget(QLabel("TM Timeout:"), row, 0, 1, 1) + grid.addWidget(QLabel("TM Timeout Factor:"), row, 1, 1, 1) row += 1 spin_timeout = QDoubleSpinBox() - spin_timeout.setValue(obsw_config.G_TM_TIMEOUT) + spin_timeout.setValue(4) # TODO: set sensible min/max values spin_timeout.setSingleStep(0.1) spin_timeout.setMinimum(0.25) - spin_timeout.setMaximum(60) + spin_timeout.setMaximum(60)# + # https://youtrack.jetbrains.com/issue/PY-22908 + # Ignore those warnings for now. spin_timeout.valueChanged.connect(number_timeout) grid.addWidget(spin_timeout, row, 0, 1, 1) @@ -222,12 +227,12 @@ class TmTcFrontend: grid.addWidget(QLabel("Single Command Operation:"), row, 0, 1, 1) row += 1 - singleCommandGrid = QGridLayout() - singleCommandGrid.setSpacing(5) + single_command_grid = QGridLayout() + single_command_grid.setSpacing(5) - singleCommandGrid.addWidget(QLabel("Service:"), row, 0, 1, 1) - singleCommandGrid.addWidget(QLabel("SubService:"), row, 1, 1, 1) - singleCommandGrid.addWidget(QLabel("SSC:"), row, 2, 1, 1) + single_command_grid.addWidget(QLabel("Service:"), row, 0, 1, 1) + single_command_grid.addWidget(QLabel("SubService:"), row, 1, 1, 1) + single_command_grid.addWidget(QLabel("SSC:"), row, 2, 1, 1) row += 1 @@ -237,7 +242,7 @@ class TmTcFrontend: spin_service.setMinimum(0) spin_service.setMaximum(99999) spin_service.valueChanged.connect(self.single_command_set_service) - singleCommandGrid.addWidget(spin_service, row, 0, 1, 1) + single_command_grid.addWidget(spin_service, row, 0, 1, 1) spin_sub_service = QSpinBox() spin_sub_service.setValue(self.single_command_sub_service) @@ -245,7 +250,7 @@ class TmTcFrontend: spin_sub_service.setMinimum(0) spin_sub_service.setMaximum(99999) spin_sub_service.valueChanged.connect(self.single_command_set_sub_service) - singleCommandGrid.addWidget(spin_sub_service, row, 1, 1, 1) + single_command_grid.addWidget(spin_sub_service, row, 1, 1, 1) spin_ssc = QSpinBox() spin_ssc.setValue(self.single_command_ssc) @@ -253,19 +258,19 @@ class TmTcFrontend: spin_ssc.setMinimum(0) spin_ssc.setMaximum(99999) spin_ssc.valueChanged.connect(self.single_command_set_ssc) - singleCommandGrid.addWidget(spin_ssc, row, 2, 1, 1) + single_command_grid.addWidget(spin_ssc, row, 2, 1, 1) row += 1 - singleCommandGrid.addWidget(QLabel("Data:"), row, 0, 1, 3) + single_command_grid.addWidget(QLabel("Data:"), row, 0, 1, 3) row += 1 # TODO: how should this be converted to the byte array? - singleCommandDataBox = QTextEdit() - singleCommandGrid.addWidget(singleCommandDataBox, row, 0, 1, 3) + single_command_data_box = QTextEdit() + single_command_grid.addWidget(single_command_data_box, row, 0, 1, 3) - grid.addItem(singleCommandGrid, row, 0, 1, 2) + grid.addItem(single_command_grid, row, 0, 1, 2) row += 1 diff --git a/tmtc_core b/tmtc_core index 3a728442dc9b5a9200272205bd6972762b3ca06f..1e06be166b0bf47a2a921fd45eed49ea9f5782c3 160000 --- a/tmtc_core +++ b/tmtc_core @@ -1 +1 @@ -Subproject commit 3a728442dc9b5a9200272205bd6972762b3ca06f +Subproject commit 1e06be166b0bf47a2a921fd45eed49ea9f5782c3