From f3327d56d48d63b21ffc03a55fa5e7db753d1707 Mon Sep 17 00:00:00 2001 From: Christian Kolset Date: Sat, 19 Sep 2026 17:38:07 -0600 Subject: Redesign Signal/Channel naming and fix pin-remap breaking references Arduino analog Signal ids used to be the pin name itself, so fixing a wrong pin silently changed the id and orphaned any plot trace, control, or filter pipeline pointing at it. Analog Signal ids are now positional (ai0, ai1, ...) and decoupled from the underlying pin, matching how digital I/O already worked. More broadly, formalizes a Device -> Signal -> Channel -> Plot naming model (SignalConfig for physical device channels, Channel for derived/ computed ones) and adds core/reference_registry.py to propagate any Signal or Channel id rename through plot traces, controls, and filter pipelines instead of leaving them dangling. Signal ids are now editable in the Signals tab with the same propagation. .labui profile schema bumped to v2.0 with a transparent migration for old files, including remapping old pin-name Signal ids to the new positional ones. Removed six confirmed-dead files (two legacy device classes, four superseded top-level ui/ duplicates). --- ui/control_editor.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ui/control_editor.py') diff --git a/ui/control_editor.py b/ui/control_editor.py index 624e4c1..40cde7e 100644 --- a/ui/control_editor.py +++ b/ui/control_editor.py @@ -214,11 +214,11 @@ class ControlEditorDialog(QDialog): self._target_cb = QComboBox() self._target_cb.addItem("— none —", userData=("", "")) for dev in self.registry.all_instances(): - for ch in dev.info.channels: + for ch in dev.info.signals: if not ch.enabled or not ch.writable: continue - label = f"{dev.info.device_id} / {ch.name} ({ch.channel_id})" - self._target_cb.addItem(label, userData=(dev.info.device_id, ch.channel_id)) + label = f"{dev.info.device_id} / {ch.name} ({ch.signal_id})" + self._target_cb.addItem(label, userData=(dev.info.device_id, ch.signal_id)) hw_form.addRow("Target Signal:", self._target_cb) self._active_low_chk = QCheckBox("Active-low output (ON sends LOW)") -- cgit v1.2.3