STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
combined_gui.CombinedMainWindow Class Reference
Inheritance diagram for combined_gui.CombinedMainWindow:
[legend]
Collaboration diagram for combined_gui.CombinedMainWindow:
[legend]

Public Member Functions

 __init__ (self, receiver, str device_ip=DEFAULT_ACTUATOR_IP, int device_port=DEFAULT_DEVICE_PORT, str bind_address="0.0.0.0")
 on_navigation_requested (self, view_name)
 on_debug_toggled (self, bool enabled)
 open_pwm_control (self)
 open_calibration (self)
 on_mode_changed (self, str mode_name)
 log_event (self, str event_type, str details)
 get_event_log (self)
 on_mapping_changed (self, gauge_name, pt_id)
 update_top_bar (self)
 closeEvent (self, event)

Public Attributes

list event_log = []
 state_machine
dict mode_to_state_map
 top_bar_widget = TopBarWidget(self)
 on_navigation_requested
 on_mode_changed
 on_debug_toggled
 stack = QtWidgets.QStackedWidget()
 sensor_widget = SensorPlotWidget(receiver, bind_address, self)
 actuator_widget
 settings_widget = SettingsWidget(self.sensor_widget, self.actuator_widget)
 on_mapping_changed
 calibration_window = None
 gauge_map = CONFIG.config["mappings"]
 update_timer = QtCore.QTimer(self)
 update_top_bar
 pwm_window = None

Protected Member Functions

 _apply_bar_limits (self)
float _get_gauge_pressure (self, str gauge_name)
 _check_auto_state_transitions (self)

Detailed Description

Single window with sensor plot (left 66%) and actuator control (right 33%).

Definition at line 5652 of file combined_gui.py.

Constructor & Destructor Documentation

◆ __init__()

combined_gui.CombinedMainWindow.__init__ ( self,
receiver,
str device_ip = DEFAULT_ACTUATOR_IP,
int device_port = DEFAULT_DEVICE_PORT,
str bind_address = "0.0.0.0" )

Definition at line 5655 of file combined_gui.py.

Member Function Documentation

◆ _apply_bar_limits()

combined_gui.CombinedMainWindow._apply_bar_limits ( self)
protected
Apply NOP, MEOP, POP, THRESH and shared scale_max to top bar gauges (bottom=0, same scale).

Definition at line 5755 of file combined_gui.py.

◆ _check_auto_state_transitions()

combined_gui.CombinedMainWindow._check_auto_state_transitions ( self)
protected
If current state and pressures meet threshold rules, automatically transition state.

Definition at line 5887 of file combined_gui.py.

◆ _get_gauge_pressure()

float combined_gui.CombinedMainWindow._get_gauge_pressure ( self,
str gauge_name )
protected
Return latest pressure (psi) for the given gauge (GN2, ETH, LOX), or 0.0 if no data.

Definition at line 5877 of file combined_gui.py.

◆ closeEvent()

combined_gui.CombinedMainWindow.closeEvent ( self,
event )
Handle window close: save labels and close actuator socket.

Definition at line 5981 of file combined_gui.py.

◆ get_event_log()

combined_gui.CombinedMainWindow.get_event_log ( self)
Get the event log, filtered by settings

Definition at line 5851 of file combined_gui.py.

◆ log_event()

combined_gui.CombinedMainWindow.log_event ( self,
str event_type,
str details )
Log an event with current relative time

Definition at line 5846 of file combined_gui.py.

◆ on_debug_toggled()

combined_gui.CombinedMainWindow.on_debug_toggled ( self,
bool enabled )
Handle DEBUG button toggle - enable/disable manual actuator control

Definition at line 5781 of file combined_gui.py.

◆ on_mapping_changed()

combined_gui.CombinedMainWindow.on_mapping_changed ( self,
gauge_name,
pt_id )

Definition at line 5873 of file combined_gui.py.

◆ on_mode_changed()

combined_gui.CombinedMainWindow.on_mode_changed ( self,
str mode_name )
Handle mode button change - apply state from CSV and log event

Definition at line 5805 of file combined_gui.py.

◆ on_navigation_requested()

combined_gui.CombinedMainWindow.on_navigation_requested ( self,
view_name )

Definition at line 5773 of file combined_gui.py.

◆ open_calibration()

combined_gui.CombinedMainWindow.open_calibration ( self)
Open the calibration window, creating it lazily.

Definition at line 5797 of file combined_gui.py.

◆ open_pwm_control()

combined_gui.CombinedMainWindow.open_pwm_control ( self)
Open the PWM control window, creating it lazily.

Definition at line 5789 of file combined_gui.py.

Referenced by combined_gui.SensorPlotWidget.on_navigation_requested().

◆ update_top_bar()

combined_gui.CombinedMainWindow.update_top_bar ( self)

Definition at line 5963 of file combined_gui.py.

Member Data Documentation

◆ actuator_widget

combined_gui.CombinedMainWindow.actuator_widget
Initial value:
= ActuatorControlWidget(
receiver, device_ip, device_port, self
)

Definition at line 5716 of file combined_gui.py.

◆ calibration_window

combined_gui.CombinedMainWindow.calibration_window = None

Definition at line 5739 of file combined_gui.py.

◆ event_log

list combined_gui.CombinedMainWindow.event_log = []

Definition at line 5665 of file combined_gui.py.

◆ gauge_map

combined_gui.CombinedMainWindow.gauge_map = CONFIG.config["mappings"]

Definition at line 5744 of file combined_gui.py.

◆ mode_to_state_map

dict combined_gui.CombinedMainWindow.mode_to_state_map
Initial value:
= {
"Idle": "Idle",
"Armed": "Armed",
"Fuel Fill": "Fuel Fill",
"Ox Fill": "Ox Fill",
"Quick Fire": "Quick Fire",
"GN2 Press": "GN2 Press",
"Fuel Press": "Fuel Press",
"Fuel Vent": "Fuel Vent",
"Ox Press": "Ox Press",
"Ox Vent": "Ox Vent",
"High Press": "High Press",
"GN2 Vent": "GN2 Vent",
"Fire": "Fire",
"Vent": "Vent",
"Abort": "Abort",
}

Definition at line 5673 of file combined_gui.py.

◆ on_debug_toggled

combined_gui.CombinedMainWindow.on_debug_toggled

Definition at line 5704 of file combined_gui.py.

◆ on_mapping_changed

combined_gui.CombinedMainWindow.on_mapping_changed

Definition at line 5733 of file combined_gui.py.

◆ on_mode_changed

combined_gui.CombinedMainWindow.on_mode_changed

Definition at line 5703 of file combined_gui.py.

◆ on_navigation_requested

combined_gui.CombinedMainWindow.on_navigation_requested

Definition at line 5702 of file combined_gui.py.

◆ pwm_window

combined_gui.CombinedMainWindow.pwm_window = None

Definition at line 5753 of file combined_gui.py.

◆ sensor_widget

combined_gui.CombinedMainWindow.sensor_widget = SensorPlotWidget(receiver, bind_address, self)

Definition at line 5715 of file combined_gui.py.

◆ settings_widget

combined_gui.CombinedMainWindow.settings_widget = SettingsWidget(self.sensor_widget, self.actuator_widget)

Definition at line 5732 of file combined_gui.py.

◆ stack

combined_gui.CombinedMainWindow.stack = QtWidgets.QStackedWidget()

Definition at line 5708 of file combined_gui.py.

◆ state_machine

combined_gui.CombinedMainWindow.state_machine

Definition at line 5668 of file combined_gui.py.

◆ top_bar_widget

combined_gui.CombinedMainWindow.top_bar_widget = TopBarWidget(self)

Definition at line 5701 of file combined_gui.py.

◆ update_timer

combined_gui.CombinedMainWindow.update_timer = QtCore.QTimer(self)

◆ update_top_bar

combined_gui.CombinedMainWindow.update_top_bar

Definition at line 5747 of file combined_gui.py.


The documentation for this class was generated from the following file: