|
STAR
Cal STAR — firmware, DAQ server, and engine design
|
Public Member Functions | |
| __init__ (self, parent=None) | |
| resizeEvent (self, event) | |
| showEvent (self, event) | |
| on_debug_clicked (self) | |
| update_button_states (self, str current_state) | |
| on_mode_button_clicked (self, idx) | |
| request_state (self, str mode_name) | |
| abort (self, str abort_type="ABORT") | |
| toggle_view (self) | |
Public Attributes | |
| lbl_time = QtWidgets.QLabel() | |
| lbl_countdown = QtWidgets.QLabel() | |
| bar_gn2 | |
| bar_eth | |
| bar_lox | |
| mode_button_group = QtWidgets.QButtonGroup(self) | |
| list | mode_buttons = [] |
| state_transitions | |
| str | current_state = None |
| tuple | unlock_states |
| quick_fire_to_gn2_timer = QtCore.QTimer(self) | |
| abort_vent_to_abort_timer = QtCore.QTimer(self) | |
| get_state_color = get_state_color | |
| get_state_selected_color = get_state_selected_color | |
| text_color_for_bg = text_color_for_bg | |
| btn_abort = QtWidgets.QPushButton("ABORT") | |
| btn_emergency = QtWidgets.QPushButton("EMERGENCY ABORT") | |
| nav_btn = QtWidgets.QPushButton("SETTINGS") | |
| toggle_view | |
| debug_btn = QtWidgets.QPushButton("DEBUG") | |
| on_debug_clicked | |
| current_state_label = QtWidgets.QLabel("CURRENT STATE: —") | |
Static Public Attributes | |
| navigation_requested = QtCore.pyqtSignal(str) | |
| mode_changed = QtCore.pyqtSignal(str) | |
| debug_toggled = QtCore.pyqtSignal(bool) | |
Protected Member Functions | |
| _update_clock (self) | |
| _update_global_line_ys (self) | |
| _update_current_state_display (self) | |
| str | _lighten_color (self, str hex_color, int amount) |
| str | _darken_color (self, str hex_color, int amount) |
| _on_quick_fire_3s_elapsed (self) | |
| _on_abort_vent_5s_elapsed (self) | |
| _clear_mode_button_selection (self) | |
| _apply_abort_state (self) | |
Protected Attributes | |
| _clock_timer = QtCore.QTimer(self) | |
| _update_clock | |
| _on_quick_fire_3s_elapsed | |
| _on_abort_vent_5s_elapsed | |
Static Protected Attributes | |
| _COUNTDOWN_TARGET_UTC | |
Definition at line 3193 of file combined_gui.py.
| combined_gui.TopBarWidget.__init__ | ( | self, | |
| parent = None ) |
|
protected |
Set GUI and emitted state to Abort (used by EMERGENCY ABORT and by 5s Vent→Abort timer).
Definition at line 3823 of file combined_gui.py.
References _clear_mode_button_selection(), _update_current_state_display(), abort_vent_to_abort_timer, current_state, EngineFSM.current_state, emit(), mode_changed, quick_fire_to_gn2_timer, stop(), and update_button_states().
Referenced by _on_abort_vent_5s_elapsed(), and abort().
|
protected |
Clear selection of all mode buttons so none appear selected (e.g. for Abort/Vent-from-abort).
Definition at line 3816 of file combined_gui.py.
References mode_button_group, and mode_buttons.
Referenced by _apply_abort_state(), and abort().
|
protected |
Darken a hex color by the given amount
Definition at line 3750 of file combined_gui.py.
References max.
|
protected |
Lighten a hex color by the given amount
Definition at line 3742 of file combined_gui.py.
References min.
Referenced by update_button_states().
|
protected |
After 5s in Vent (from ABORT button), auto-transition to Abort.
Definition at line 3812 of file combined_gui.py.
References _apply_abort_state().
|
protected |
After 3s in Quick Fire, auto-transition to GN2 Press.
Definition at line 3807 of file combined_gui.py.
References current_state, EngineFSM.current_state, and request_state().
|
protected |
Update the current-time label and the countdown-to-launch label.
Definition at line 3579 of file combined_gui.py.
References _COUNTDOWN_TARGET_UTC, lbl_countdown, and lbl_time.
|
protected |
Update the CURRENT STATE label to reflect self.current_state.
Definition at line 3622 of file combined_gui.py.
References current_state, EngineFSM.current_state, and current_state_label.
Referenced by _apply_abort_state(), abort(), on_mode_button_clicked(), and request_state().
|
protected |
Compute bar rect once from first bar; set same y20,y40,y60,y80 (parent coords) on all three bars.
Definition at line 3599 of file combined_gui.py.
References bar_eth, bar_gn2, and bar_lox.
Referenced by resizeEvent(), and showEvent().
| combined_gui.TopBarWidget.abort | ( | self, | |
| str | abort_type = "ABORT" ) |
Trigger Abort state (CSV) and log the event. ABORT: go to Vent first, then after 5s automatically go to Abort. EMERGENCY ABORT: go to Abort immediately, no matter what state or mode (including DEBUG).
Definition at line 3867 of file combined_gui.py.
References _apply_abort_state(), _clear_mode_button_selection(), _update_current_state_display(), abort_vent_to_abort_timer, current_state, EngineFSM.current_state, emit(), mode_changed, path.parent(), quick_fire_to_gn2_timer, start(), stop(), and update_button_states().
| combined_gui.TopBarWidget.on_debug_clicked | ( | self | ) |
Handle DEBUG button click (toggle) - unlocks states and manual actuator control
Definition at line 3627 of file combined_gui.py.
References current_state, EngineFSM.current_state, debug_btn, debug_toggled, emit(), unlock_states, and update_button_states().
| combined_gui.TopBarWidget.on_mode_button_clicked | ( | self, | |
| idx ) |
Handle mode button click - update highlighting
Definition at line 3758 of file combined_gui.py.
References _update_current_state_display(), abort_vent_to_abort_timer, current_state, EngineFSM.current_state, emit(), mode_buttons, mode_changed, quick_fire_to_gn2_timer, start(), stop(), unlock_states, and update_button_states().
| combined_gui.TopBarWidget.request_state | ( | self, | |
| str | mode_name ) |
Programmatically switch to a state (e.g. for automatic pressure-based transitions). Bypasses transition check.
Definition at line 3833 of file combined_gui.py.
References _update_current_state_display(), abort_vent_to_abort_timer, current_state, EngineFSM.current_state, emit(), mode_buttons, mode_changed, quick_fire_to_gn2_timer, start(), stop(), and update_button_states().
Referenced by _on_quick_fire_3s_elapsed().
| combined_gui.TopBarWidget.resizeEvent | ( | self, | |
| event ) |
Definition at line 3614 of file combined_gui.py.
References _update_global_line_ys(), and resizeEvent().
Referenced by resizeEvent().
| combined_gui.TopBarWidget.showEvent | ( | self, | |
| event ) |
Definition at line 3618 of file combined_gui.py.
References _update_global_line_ys(), and showEvent().
Referenced by showEvent().
| combined_gui.TopBarWidget.toggle_view | ( | self | ) |
Definition at line 3893 of file combined_gui.py.
References emit(), nav_btn, and navigation_requested.
| combined_gui.TopBarWidget.update_button_states | ( | self, | |
| str | current_state ) |
Update button enabled/disabled states and styles based on allowed transitions
Definition at line 3638 of file combined_gui.py.
References _lighten_color(), get_state_color, get_state_selected_color, mode_buttons, state_transitions, text_color_for_bg, and unlock_states.
Referenced by _apply_abort_state(), abort(), on_debug_clicked(), on_mode_button_clicked(), and request_state().
|
protected |
Definition at line 3244 of file combined_gui.py.
|
staticprotected |
Definition at line 3199 of file combined_gui.py.
Referenced by _update_clock().
|
protected |
Definition at line 3356 of file combined_gui.py.
|
protected |
Definition at line 3352 of file combined_gui.py.
|
protected |
Definition at line 3246 of file combined_gui.py.
| combined_gui.TopBarWidget.abort_vent_to_abort_timer = QtCore.QTimer(self) |
Definition at line 3354 of file combined_gui.py.
Referenced by _apply_abort_state(), abort(), on_mode_button_clicked(), and request_state().
| combined_gui.TopBarWidget.bar_eth |
Definition at line 3275 of file combined_gui.py.
Referenced by _update_global_line_ys().
| combined_gui.TopBarWidget.bar_gn2 |
Definition at line 3267 of file combined_gui.py.
Referenced by _update_global_line_ys().
| combined_gui.TopBarWidget.bar_lox |
Definition at line 3283 of file combined_gui.py.
Referenced by _update_global_line_ys().
| combined_gui.TopBarWidget.btn_abort = QtWidgets.QPushButton("ABORT") |
Definition at line 3443 of file combined_gui.py.
| combined_gui.TopBarWidget.btn_emergency = QtWidgets.QPushButton("EMERGENCY ABORT") |
Definition at line 3468 of file combined_gui.py.
| combined_gui.TopBarWidget.current_state = None |
Definition at line 3344 of file combined_gui.py.
Referenced by _apply_abort_state(), _on_quick_fire_3s_elapsed(), _update_current_state_display(), abort(), on_debug_clicked(), on_mode_button_clicked(), and request_state().
| combined_gui.TopBarWidget.current_state_label = QtWidgets.QLabel("CURRENT STATE: —") |
Definition at line 3572 of file combined_gui.py.
Referenced by _update_current_state_display().
| combined_gui.TopBarWidget.debug_btn = QtWidgets.QPushButton("DEBUG") |
Definition at line 3530 of file combined_gui.py.
Referenced by on_debug_clicked().
|
static |
Definition at line 3196 of file combined_gui.py.
Referenced by on_debug_clicked().
| combined_gui.TopBarWidget.get_state_color = get_state_color |
Definition at line 3375 of file combined_gui.py.
Referenced by update_button_states().
| combined_gui.TopBarWidget.get_state_selected_color = get_state_selected_color |
Definition at line 3394 of file combined_gui.py.
Referenced by update_button_states().
| combined_gui.TopBarWidget.lbl_countdown = QtWidgets.QLabel() |
Definition at line 3221 of file combined_gui.py.
Referenced by _update_clock().
| combined_gui.TopBarWidget.lbl_time = QtWidgets.QLabel() |
Definition at line 3215 of file combined_gui.py.
Referenced by _update_clock().
| combined_gui.TopBarWidget.mode_button_group = QtWidgets.QButtonGroup(self) |
Definition at line 3315 of file combined_gui.py.
Referenced by _clear_mode_button_selection().
| combined_gui.TopBarWidget.mode_buttons = [] |
Definition at line 3338 of file combined_gui.py.
Referenced by _clear_mode_button_selection(), on_mode_button_clicked(), request_state(), and update_button_states().
|
static |
Definition at line 3195 of file combined_gui.py.
Referenced by _apply_abort_state(), abort(), on_mode_button_clicked(), and request_state().
| combined_gui.TopBarWidget.nav_btn = QtWidgets.QPushButton("SETTINGS") |
Definition at line 3498 of file combined_gui.py.
Referenced by toggle_view().
|
static |
Definition at line 3194 of file combined_gui.py.
Referenced by toggle_view().
| combined_gui.TopBarWidget.on_debug_clicked |
Definition at line 3534 of file combined_gui.py.
| combined_gui.TopBarWidget.quick_fire_to_gn2_timer = QtCore.QTimer(self) |
Definition at line 3350 of file combined_gui.py.
Referenced by _apply_abort_state(), abort(), on_mode_button_clicked(), and request_state().
| combined_gui.TopBarWidget.state_transitions |
Definition at line 3341 of file combined_gui.py.
Referenced by update_button_states().
| combined_gui.TopBarWidget.text_color_for_bg = text_color_for_bg |
Definition at line 3406 of file combined_gui.py.
Referenced by update_button_states().
| combined_gui.TopBarWidget.toggle_view |
Definition at line 3521 of file combined_gui.py.
| tuple combined_gui.TopBarWidget.unlock_states |
Definition at line 3345 of file combined_gui.py.
Referenced by on_debug_clicked(), on_mode_button_clicked(), and update_button_states().