diff options
Diffstat (limited to 'ui/control_editor.py')
| -rw-r--r-- | ui/control_editor.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ui/control_editor.py b/ui/control_editor.py index 40cde7e..e62e146 100644 --- a/ui/control_editor.py +++ b/ui/control_editor.py @@ -40,6 +40,7 @@ from devices.device_registry import DeviceRegistry CONTROL_TYPES = [ "On/Off Switch", + "Safety Switch", "Motor Control", "PWM Output", "Setpoint", @@ -48,6 +49,7 @@ CONTROL_TYPES = [ CONTROL_ICONS = { "On/Off Switch": "⏻", + "Safety Switch": "🔒", "Motor Control": "⟳", "PWM Output": "⊓", "Setpoint": "◎", @@ -160,6 +162,7 @@ class AnalogOutParams(QWidget): _PARAM_PANELS = { "On/Off Switch": OnOffParams, + "Safety Switch": OnOffParams, # same shape as On/Off — no extra params "Motor Control": MotorParams, "PWM Output": PwmParams, "Setpoint": SetpointParams, @@ -347,7 +350,7 @@ class ControlEditorDialog(QDialog): self._stack.setCurrentIndex(idx) self._stack.updateGeometry() self._params_grp.updateGeometry() - self._active_low_chk.setEnabled(type_name == "On/Off Switch") + self._active_low_chk.setEnabled(type_name in ("On/Off Switch", "Safety Switch")) # Auto-set title if still default if not self._title_edit.text() or \ self._title_edit.text() in CONTROL_TYPES: |
