c7eb33891c
The current spin box could not hold a typed value: the 1 Hz status poll read LDS and wrote it straight into the spin box, so the operator's number was replaced by the laser's within a second — before Set could be pressed. The spin box is now seeded once on connect and belongs to the operator after that; the poll's reading goes to a read-back label beside the Set button, so the value about to be sent and the value the laser holds are separate readouts. The write itself was also unverified. Section 6 of the operator's manual: "Commands or set values can be discarded by the controller unintentionally. It is recommended to query the set value after the command is entered to confirm the actual value." set_current_ma() wrote LDS and returned True regardless, so a discarded write looked exactly like a good one. _write_verified() now writes, reads back, and retries up to three times; set_current_ma() and set_frequency_hz() use it, and HeliosWorker reports a refusal on the status line instead of echoing the requested value. Also from the manual, recorded but not acted on: LDS accepts 0-7000 mA (the driver's 2000 mA ceiling is this rig's, not the protocol's), LDF has to be re-sent after LDG changes, and the power-monitor mnemonic is HMP — which this laser does not implement, per the operator. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
316 lines
8.3 KiB
XML
Executable File
316 lines
8.3 KiB
XML
Executable File
<?xml version="1.0" encoding="UTF-8"?>
|
|
<ui version="4.0">
|
|
<class>Form</class>
|
|
<widget class="QWidget" name="Form">
|
|
<property name="geometry">
|
|
<rect>
|
|
<x>0</x>
|
|
<y>0</y>
|
|
<width>360</width>
|
|
<height>380</height>
|
|
</rect>
|
|
</property>
|
|
<property name="windowTitle">
|
|
<string>Helios Laser</string>
|
|
</property>
|
|
<layout class="QVBoxLayout" name="verticalLayout">
|
|
<item>
|
|
<widget class="QGroupBox" name="groupBox_connection">
|
|
<property name="title">
|
|
<string>Connection</string>
|
|
</property>
|
|
<layout class="QHBoxLayout" name="horizontalLayout_conn">
|
|
<item>
|
|
<widget class="QLabel" name="label_port">
|
|
<property name="text">
|
|
<string>Port:</string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item>
|
|
<widget class="QLineEdit" name="helios_port_edit"/>
|
|
</item>
|
|
<item>
|
|
<widget class="QPushButton" name="helios_connect_toggle">
|
|
<property name="text">
|
|
<string>Connect</string>
|
|
</property>
|
|
<property name="checkable">
|
|
<bool>true</bool>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
</layout>
|
|
</widget>
|
|
</item>
|
|
<item>
|
|
<layout class="QHBoxLayout" name="horizontalLayout_emission">
|
|
<item>
|
|
<widget class="QLabel" name="helios_emission_indicator">
|
|
<property name="text">
|
|
<string/>
|
|
</property>
|
|
<property name="minimumSize">
|
|
<size>
|
|
<width>20</width>
|
|
<height>20</height>
|
|
</size>
|
|
</property>
|
|
<property name="maximumSize">
|
|
<size>
|
|
<width>20</width>
|
|
<height>20</height>
|
|
</size>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item>
|
|
<widget class="QPushButton" name="helios_enable_btn">
|
|
<property name="text">
|
|
<string>Enable Laser</string>
|
|
</property>
|
|
<property name="checkable">
|
|
<bool>true</bool>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
</layout>
|
|
</item>
|
|
<item>
|
|
<widget class="QGroupBox" name="groupBox_current">
|
|
<property name="title">
|
|
<string>Diode Current</string>
|
|
</property>
|
|
<layout class="QHBoxLayout" name="horizontalLayout_current">
|
|
<item>
|
|
<widget class="QLabel" name="label_current">
|
|
<property name="text">
|
|
<string>mA:</string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item>
|
|
<widget class="QSpinBox" name="helios_current_spin">
|
|
<property name="minimum">
|
|
<number>0</number>
|
|
</property>
|
|
<property name="maximum">
|
|
<number>2000</number>
|
|
</property>
|
|
<property name="value">
|
|
<number>500</number>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item>
|
|
<widget class="QPushButton" name="helios_set_current_btn">
|
|
<property name="text">
|
|
<string>Set</string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item>
|
|
<widget class="QLabel" name="helios_current_readback_label">
|
|
<property name="toolTip">
|
|
<string>The diode current the controller reports. The spin box is the value that will be sent when Set is pressed.</string>
|
|
</property>
|
|
<property name="text">
|
|
<string>laser: --- mA</string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item>
|
|
<spacer name="horizontalSpacer_current">
|
|
<property name="orientation">
|
|
<enum>Qt::Orientation::Horizontal</enum>
|
|
</property>
|
|
<property name="sizeHint" stdset="0">
|
|
<size>
|
|
<width>40</width>
|
|
<height>20</height>
|
|
</size>
|
|
</property>
|
|
</spacer>
|
|
</item>
|
|
</layout>
|
|
</widget>
|
|
</item>
|
|
<item>
|
|
<widget class="QGroupBox" name="groupBox_temp">
|
|
<property name="title">
|
|
<string>Temperature</string>
|
|
</property>
|
|
<layout class="QGridLayout" name="gridLayout_temp">
|
|
<item row="0" column="0">
|
|
<widget class="QLabel" name="label_temp_diode">
|
|
<property name="text">
|
|
<string>Diode:</string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item row="0" column="1">
|
|
<widget class="QLabel" name="helios_temp_diode_label">
|
|
<property name="text">
|
|
<string>--- °C</string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item row="1" column="0">
|
|
<widget class="QLabel" name="label_temp_pstage">
|
|
<property name="text">
|
|
<string>Power Stage:</string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item row="1" column="1">
|
|
<widget class="QLabel" name="helios_temp_pstage_label">
|
|
<property name="text">
|
|
<string>--- °C</string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item row="2" column="0">
|
|
<widget class="QLabel" name="label_temp_qswitch">
|
|
<property name="text">
|
|
<string>Q-Switch:</string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item row="2" column="1">
|
|
<widget class="QLabel" name="helios_temp_qswitch_label">
|
|
<property name="text">
|
|
<string>--- °C</string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item row="0" column="2">
|
|
<spacer name="horizontalSpacer">
|
|
<property name="orientation">
|
|
<enum>Qt::Orientation::Horizontal</enum>
|
|
</property>
|
|
<property name="sizeHint" stdset="0">
|
|
<size>
|
|
<width>40</width>
|
|
<height>20</height>
|
|
</size>
|
|
</property>
|
|
</spacer>
|
|
</item>
|
|
</layout>
|
|
</widget>
|
|
</item>
|
|
<item>
|
|
<widget class="QGroupBox" name="groupBox_status">
|
|
<property name="title">
|
|
<string>Status Registers</string>
|
|
</property>
|
|
<layout class="QGridLayout" name="gridLayout_status">
|
|
<item row="0" column="0">
|
|
<widget class="QLabel" name="label_ler">
|
|
<property name="text">
|
|
<string>LER:</string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item row="0" column="1">
|
|
<widget class="QLabel" name="helios_ler_label">
|
|
<property name="font">
|
|
<font>
|
|
<family>monospace</family>
|
|
</font>
|
|
</property>
|
|
<property name="text">
|
|
<string>---</string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item row="1" column="0">
|
|
<widget class="QLabel" name="label_lce">
|
|
<property name="text">
|
|
<string>LCE:</string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item row="1" column="1">
|
|
<widget class="QLabel" name="helios_lce_label">
|
|
<property name="font">
|
|
<font>
|
|
<family>monospace</family>
|
|
</font>
|
|
</property>
|
|
<property name="text">
|
|
<string>---</string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item row="2" column="0">
|
|
<widget class="QLabel" name="label_cce">
|
|
<property name="text">
|
|
<string>CCE:</string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item row="2" column="1">
|
|
<widget class="QLabel" name="helios_cce_label">
|
|
<property name="font">
|
|
<font>
|
|
<family>monospace</family>
|
|
</font>
|
|
</property>
|
|
<property name="text">
|
|
<string>---</string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item row="0" column="2">
|
|
<spacer name="horizontalSpacer_2">
|
|
<property name="orientation">
|
|
<enum>Qt::Orientation::Horizontal</enum>
|
|
</property>
|
|
<property name="sizeHint" stdset="0">
|
|
<size>
|
|
<width>40</width>
|
|
<height>20</height>
|
|
</size>
|
|
</property>
|
|
</spacer>
|
|
</item>
|
|
</layout>
|
|
</widget>
|
|
</item>
|
|
<item>
|
|
<widget class="QLabel" name="helios_status_label">
|
|
<property name="text">
|
|
<string/>
|
|
</property>
|
|
<property name="wordWrap">
|
|
<bool>true</bool>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item>
|
|
<spacer name="verticalSpacer">
|
|
<property name="orientation">
|
|
<enum>Qt::Orientation::Vertical</enum>
|
|
</property>
|
|
<property name="sizeHint" stdset="0">
|
|
<size>
|
|
<width>20</width>
|
|
<height>10</height>
|
|
</size>
|
|
</property>
|
|
</spacer>
|
|
</item>
|
|
<item>
|
|
<widget class="QPushButton" name="helios_close_btn">
|
|
<property name="text">
|
|
<string>Close</string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
</layout>
|
|
</widget>
|
|
<resources/>
|
|
<connections/>
|
|
</ui>
|