diff options
| author | Christian Kolset <christian.kolset@gmail.com> | 2026-09-19 17:38:07 -0600 |
|---|---|---|
| committer | Christian Kolset <christian.kolset@gmail.com> | 2026-09-19 17:38:07 -0600 |
| commit | f3327d56d48d63b21ffc03a55fa5e7db753d1707 (patch) | |
| tree | e19d4c7846dd4a434f8a18f82290597731b4a12c /ui/namespace_panel.py | |
| parent | 00671a90bb51bfe485d98a928a456d55adbe1faf (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/namespace_panel.py')
| -rw-r--r-- | ui/namespace_panel.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ui/namespace_panel.py b/ui/namespace_panel.py index 44750c6..9616db7 100644 --- a/ui/namespace_panel.py +++ b/ui/namespace_panel.py @@ -107,9 +107,9 @@ class NamespacePanel(QWidget): def _desired_keys(self): keys = [] for dev in self.registry.all_instances(): - for ch in dev.info.channels: + for ch in dev.info.signals: if ch.enabled: - keys.append(("signal", dev.info.device_id, ch.channel_id)) + keys.append(("signal", dev.info.device_id, ch.signal_id)) for dc in self.processor.get_derived(): keys.append(("channel", dc.channel_id)) for name in self.processor.list_vars(): @@ -131,7 +131,7 @@ class NamespacePanel(QWidget): if kind == "signal": _, dev_id, ch_id = key dev = self.registry.get_instance(dev_id) - ch = dev.get_channel(ch_id) if dev else None + ch = dev.get_signal(ch_id) if dev else None name = ch.name if ch else ch_id is_wr = bool(ch and ch.writable) self._set_row(row, "Signal", ch_id, name, "WRITE" if is_wr else "READ", |
