summaryrefslogtreecommitdiff
path: root/ui/windows/plot_window.py
diff options
context:
space:
mode:
authorChristian Kolset <christian.kolset@gmail.com>2026-09-19 17:38:07 -0600
committerChristian Kolset <christian.kolset@gmail.com>2026-09-19 17:38:07 -0600
commitf3327d56d48d63b21ffc03a55fa5e7db753d1707 (patch)
treee19d4c7846dd4a434f8a18f82290597731b4a12c /ui/windows/plot_window.py
parent00671a90bb51bfe485d98a928a456d55adbe1faf (diff)
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).
Diffstat (limited to 'ui/windows/plot_window.py')
-rw-r--r--ui/windows/plot_window.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/ui/windows/plot_window.py b/ui/windows/plot_window.py
index e810365..c0aea4e 100644
--- a/ui/windows/plot_window.py
+++ b/ui/windows/plot_window.py
@@ -341,18 +341,18 @@ class TraceChannelPickerDialog(QDialog):
any_available = False
for dev in registry.all_instances():
- for ch in dev.info.channels:
+ for ch in dev.info.signals:
if not ch.enabled:
continue
any_available = True
- chk = QCheckBox(f"{ch.name} ({dev.info.device_id}/{ch.channel_id})")
- self._checks.append((chk, dev.info.device_id, ch.channel_id, ch.name, ch.color))
+ chk = QCheckBox(f"Signal: {ch.name} ({dev.info.device_id}/{ch.signal_id})")
+ self._checks.append((chk, dev.info.device_id, ch.signal_id, ch.name, ch.color))
cl.addWidget(chk)
for dc in processor.get_derived():
if not dc.enabled:
continue
any_available = True
- chk = QCheckBox(f"{dc.name} ([virtual]/{dc.channel_id})")
+ chk = QCheckBox(f"Channel: {dc.name} ([virtual]/{dc.channel_id})")
self._checks.append((chk, "derived", dc.channel_id, dc.name, dc.color))
cl.addWidget(chk)
@@ -498,15 +498,15 @@ class PaneBlock(QFrame):
self._x_cb.setMinimumWidth(150)
self._x_cb.addItem("⏱ Time (elapsed s)", userData="time")
for dev in self.registry.all_instances():
- for ch in dev.info.channels:
+ for ch in dev.info.signals:
if not ch.enabled:
continue
- self._x_cb.addItem(f"{ch.name} ({dev.info.device_id}/{ch.channel_id})",
- userData=f"{dev.info.device_id}/{ch.channel_id}")
+ self._x_cb.addItem(f"Signal: {ch.name} ({dev.info.device_id}/{ch.signal_id})",
+ userData=f"{dev.info.device_id}/{ch.signal_id}")
for dc in self.processor.get_derived():
if not dc.enabled:
continue
- self._x_cb.addItem(f"{dc.name} ([virtual]/{dc.channel_id})",
+ self._x_cb.addItem(f"Channel: {dc.name} ([virtual]/{dc.channel_id})",
userData=f"derived/{dc.channel_id}")
for i in range(self._x_cb.count()):
if self._x_cb.itemData(i) == self.spec.x_source: