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

Public Member Functions

 __init__ (self, "BallValveGui" gui, int actuator_id, int sensor_id)
 on_counts (self, int counts)
 refresh_position (self)
 set_command_label (self, bool heartbeats_on)
 update_controls (self, bool heartbeats_on)

Public Attributes

 actuator_id = actuator_id
 sensor_id = sensor_id
str|None commanded = None
float|None position_volts = None
float position_last_seen = 0.0
 state_label = QtWidgets.QLabel()
 position_label = QtWidgets.QLabel()
 position_bar = QtWidgets.QProgressBar()
 open_btn = QtWidgets.QPushButton("OPEN (1)")
 close_btn = QtWidgets.QPushButton("CLOSE (0)")

Detailed Description

One valve: commanded state, position, OPEN/CLOSE.

Definition at line 106 of file ball_valve_gui.py.

Constructor & Destructor Documentation

◆ __init__()

ball_valve_gui.ValvePanel.__init__ ( self,
"BallValveGui" gui,
int actuator_id,
int sensor_id )

Definition at line 109 of file ball_valve_gui.py.

References __init__().

Referenced by __init__().

Member Function Documentation

◆ on_counts()

ball_valve_gui.ValvePanel.on_counts ( self,
int counts )

Definition at line 148 of file ball_valve_gui.py.

References position_last_seen, position_volts, and time.time().

◆ refresh_position()

ball_valve_gui.ValvePanel.refresh_position ( self)

◆ set_command_label()

ball_valve_gui.ValvePanel.set_command_label ( self,
bool heartbeats_on )

Definition at line 168 of file ball_valve_gui.py.

References commanded, and state_label.

Referenced by ball_valve_gui.BallValveGui.toggle_heartbeats().

◆ update_controls()

ball_valve_gui.ValvePanel.update_controls ( self,
bool heartbeats_on )

Definition at line 183 of file ball_valve_gui.py.

References close_btn, and open_btn.

Referenced by ball_valve_gui.BallValveGui.toggle_heartbeats().

Member Data Documentation

◆ actuator_id

ball_valve_gui.ValvePanel.actuator_id = actuator_id

Definition at line 111 of file ball_valve_gui.py.

◆ close_btn

ball_valve_gui.ValvePanel.close_btn = QtWidgets.QPushButton("CLOSE (0)")

Definition at line 133 of file ball_valve_gui.py.

Referenced by update_controls().

◆ commanded

str | None ball_valve_gui.ValvePanel.commanded = None

Definition at line 113 of file ball_valve_gui.py.

Referenced by set_command_label().

◆ open_btn

ball_valve_gui.ValvePanel.open_btn = QtWidgets.QPushButton("OPEN (1)")

Definition at line 132 of file ball_valve_gui.py.

Referenced by update_controls().

◆ position_bar

ball_valve_gui.ValvePanel.position_bar = QtWidgets.QProgressBar()

Definition at line 128 of file ball_valve_gui.py.

Referenced by refresh_position().

◆ position_label

ball_valve_gui.ValvePanel.position_label = QtWidgets.QLabel()

Definition at line 125 of file ball_valve_gui.py.

Referenced by refresh_position().

◆ position_last_seen

float ball_valve_gui.ValvePanel.position_last_seen = 0.0

Definition at line 115 of file ball_valve_gui.py.

Referenced by on_counts(), and refresh_position().

◆ position_volts

float | None ball_valve_gui.ValvePanel.position_volts = None

Definition at line 114 of file ball_valve_gui.py.

Referenced by on_counts(), and refresh_position().

◆ sensor_id

ball_valve_gui.ValvePanel.sensor_id = sensor_id

◆ state_label

ball_valve_gui.ValvePanel.state_label = QtWidgets.QLabel()

Definition at line 117 of file ball_valve_gui.py.

Referenced by set_command_label().


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