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

Public Member Functions

 __init__ (self, receiver, Optional[ElodinClient] elodin_client=None, str bind_address="0.0.0.0", parent=None)
float code_to_voltage (self, int code_uint32)
 init_ui (self)
 on_sensor_data (self, dict header, List[dict] chunks, str source_ip)
 add_sensor_plot (self, int sensor_id)
 update_plots (self)
 poll_elodin_data (self)
 on_status_update (self, str status)
 on_auto_scale_toggled (self, state)

Public Attributes

 receiver = receiver
 elodin_client = elodin_client
 bind_address = bind_address
dict sensor_data = {}
tuple sensor_adc_codes
dict sensor_psi_data = {}
dict sensor_plots = {}
dict sensor_labels
 pt_calibration = load_pt_calibration()
 filter_source_ip
int adc_bits = 32
float reference_voltage = 2.5
 window_seconds = CONFIG.config["display"]["window_seconds"]
 y_axis_auto_scale = CONFIG.config["display"]["y_axis_autoscale"]
 y_axis_min = CONFIG.config["display"]["y_axis_min"]
 y_axis_max = CONFIG.config["display"]["y_axis_max"]
 stats_start_time = time.time()
 on_sensor_data
 on_status_update
 update_timer = QtCore.QTimer(self)
 update_plots
 elodin_timer = QtCore.QTimer(self)
 poll_elodin_data
 status_label = QtWidgets.QLabel("Starting...")
 auto_scale_checkbox = QtWidgets.QCheckBox("Auto-scale Y-axis")
 on_auto_scale_toggled
 plot_widget = pg.GraphicsLayoutWidget()
 packets_label = QtWidgets.QLabel("Packets: 0")
 pps_label = QtWidgets.QLabel("Packets/sec: 0.0")
dict connector_labels = {}
 plot_item = self.plot_widget.addPlot(title="Pressure Data Over Time")

Detailed Description

Real-time sensor data visualization

Definition at line 931 of file combined_fsw_gui.py.

Constructor & Destructor Documentation

◆ __init__()

combined_fsw_gui.SensorPlotWidget.__init__ ( self,
receiver,
Optional[ElodinClient] elodin_client = None,
str bind_address = "0.0.0.0",
parent = None )

Definition at line 934 of file combined_fsw_gui.py.

Member Function Documentation

◆ add_sensor_plot()

combined_fsw_gui.SensorPlotWidget.add_sensor_plot ( self,
int sensor_id )
Add plot line for sensor

Definition at line 1120 of file combined_fsw_gui.py.

◆ code_to_voltage()

float combined_fsw_gui.SensorPlotWidget.code_to_voltage ( self,
int code_uint32 )
Convert ADC code to voltage

Definition at line 995 of file combined_fsw_gui.py.

◆ init_ui()

combined_fsw_gui.SensorPlotWidget.init_ui ( self)
Initialize UI

Definition at line 1003 of file combined_fsw_gui.py.

◆ on_auto_scale_toggled()

combined_fsw_gui.SensorPlotWidget.on_auto_scale_toggled ( self,
state )
Handle auto-scale toggle

Definition at line 1198 of file combined_fsw_gui.py.

◆ on_sensor_data()

combined_fsw_gui.SensorPlotWidget.on_sensor_data ( self,
dict header,
List[dict] chunks,
str source_ip )
Handle sensor data from UDP or Elodin - ONLY from PT board, not actuator board

Definition at line 1082 of file combined_fsw_gui.py.

◆ on_status_update()

combined_fsw_gui.SensorPlotWidget.on_status_update ( self,
str status )
Handle status updates

Definition at line 1194 of file combined_fsw_gui.py.

◆ poll_elodin_data()

combined_fsw_gui.SensorPlotWidget.poll_elodin_data ( self)
Poll Elodin for sensor data

Definition at line 1182 of file combined_fsw_gui.py.

◆ update_plots()

combined_fsw_gui.SensorPlotWidget.update_plots ( self)
Update plot data

Definition at line 1130 of file combined_fsw_gui.py.

Member Data Documentation

◆ adc_bits

int combined_fsw_gui.SensorPlotWidget.adc_bits = 32

Definition at line 966 of file combined_fsw_gui.py.

◆ auto_scale_checkbox

combined_fsw_gui.SensorPlotWidget.auto_scale_checkbox = QtWidgets.QCheckBox("Auto-scale Y-axis")

Definition at line 1014 of file combined_fsw_gui.py.

◆ bind_address

combined_fsw_gui.SensorPlotWidget.bind_address = bind_address

Definition at line 944 of file combined_fsw_gui.py.

◆ connector_labels

dict combined_fsw_gui.SensorPlotWidget.connector_labels = {}

Definition at line 1046 of file combined_fsw_gui.py.

◆ elodin_client

combined_fsw_gui.SensorPlotWidget.elodin_client = elodin_client

Definition at line 943 of file combined_fsw_gui.py.

◆ elodin_timer

combined_fsw_gui.SensorPlotWidget.elodin_timer = QtCore.QTimer(self)

Definition at line 991 of file combined_fsw_gui.py.

◆ filter_source_ip

combined_fsw_gui.SensorPlotWidget.filter_source_ip
Initial value:
= CONFIG.config["network"].get(
"sensor_ip_filter", DEFAULT_SENSOR_IP
)

Definition at line 961 of file combined_fsw_gui.py.

◆ on_auto_scale_toggled

combined_fsw_gui.SensorPlotWidget.on_auto_scale_toggled

Definition at line 1016 of file combined_fsw_gui.py.

◆ on_sensor_data

combined_fsw_gui.SensorPlotWidget.on_sensor_data

Definition at line 981 of file combined_fsw_gui.py.

◆ on_status_update

combined_fsw_gui.SensorPlotWidget.on_status_update

Definition at line 982 of file combined_fsw_gui.py.

◆ packets_label

combined_fsw_gui.SensorPlotWidget.packets_label = QtWidgets.QLabel("Packets: 0")

Definition at line 1036 of file combined_fsw_gui.py.

◆ plot_item

combined_fsw_gui.SensorPlotWidget.plot_item = self.plot_widget.addPlot(title="Pressure Data Over Time")

Definition at line 1062 of file combined_fsw_gui.py.

◆ plot_widget

combined_fsw_gui.SensorPlotWidget.plot_widget = pg.GraphicsLayoutWidget()

Definition at line 1025 of file combined_fsw_gui.py.

◆ poll_elodin_data

combined_fsw_gui.SensorPlotWidget.poll_elodin_data

Definition at line 992 of file combined_fsw_gui.py.

◆ pps_label

combined_fsw_gui.SensorPlotWidget.pps_label = QtWidgets.QLabel("Packets/sec: 0.0")

Definition at line 1037 of file combined_fsw_gui.py.

◆ pt_calibration

combined_fsw_gui.SensorPlotWidget.pt_calibration = load_pt_calibration()

Definition at line 958 of file combined_fsw_gui.py.

◆ receiver

combined_fsw_gui.SensorPlotWidget.receiver = receiver

Definition at line 942 of file combined_fsw_gui.py.

◆ reference_voltage

combined_fsw_gui.SensorPlotWidget.reference_voltage = 2.5

Definition at line 967 of file combined_fsw_gui.py.

◆ sensor_adc_codes

tuple combined_fsw_gui.SensorPlotWidget.sensor_adc_codes
Initial value:
= (
{}
)

Definition at line 948 of file combined_fsw_gui.py.

◆ sensor_data

dict combined_fsw_gui.SensorPlotWidget.sensor_data = {}

Definition at line 947 of file combined_fsw_gui.py.

◆ sensor_labels

dict combined_fsw_gui.SensorPlotWidget.sensor_labels
Initial value:
= {
i: CONFIG.get_sensor_label(i) for i in range(1, NUM_SENSORS + 1)
}

Definition at line 953 of file combined_fsw_gui.py.

◆ sensor_plots

dict combined_fsw_gui.SensorPlotWidget.sensor_plots = {}

Definition at line 952 of file combined_fsw_gui.py.

◆ sensor_psi_data

dict combined_fsw_gui.SensorPlotWidget.sensor_psi_data = {}

Definition at line 951 of file combined_fsw_gui.py.

◆ stats_start_time

combined_fsw_gui.SensorPlotWidget.stats_start_time = time.time()

Definition at line 975 of file combined_fsw_gui.py.

◆ status_label

combined_fsw_gui.SensorPlotWidget.status_label = QtWidgets.QLabel("Starting...")

Definition at line 1009 of file combined_fsw_gui.py.

◆ update_plots

combined_fsw_gui.SensorPlotWidget.update_plots

◆ update_timer

combined_fsw_gui.SensorPlotWidget.update_timer = QtCore.QTimer(self)

Definition at line 985 of file combined_fsw_gui.py.

◆ window_seconds

combined_fsw_gui.SensorPlotWidget.window_seconds = CONFIG.config["display"]["window_seconds"]

Definition at line 970 of file combined_fsw_gui.py.

◆ y_axis_auto_scale

combined_fsw_gui.SensorPlotWidget.y_axis_auto_scale = CONFIG.config["display"]["y_axis_autoscale"]

Definition at line 971 of file combined_fsw_gui.py.

◆ y_axis_max

combined_fsw_gui.SensorPlotWidget.y_axis_max = CONFIG.config["display"]["y_axis_max"]

Definition at line 973 of file combined_fsw_gui.py.

◆ y_axis_min

combined_fsw_gui.SensorPlotWidget.y_axis_min = CONFIG.config["display"]["y_axis_min"]

Definition at line 972 of file combined_fsw_gui.py.


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