summaryrefslogtreecommitdiff
path: root/core/signal_processor.py
diff options
context:
space:
mode:
authorChristian Kolset <ckolset@colostate.edu>2026-08-10 16:45:37 -0600
committerChristian Kolset <ckolset@colostate.edu>2026-08-10 16:45:37 -0600
commit8d546990c86df61174b2f3f2036771757aa69913 (patch)
treed306d5da66d0a77a060421f3e72b9005ebb9a400 /core/signal_processor.py
parent5d5bcaed8639a162fda85c8cd0d340c296a054b8 (diff)
Add dockable Namespace panel — live Python-namespace browser
New right-docked panel (mirrors Control Panel's dock, opposite side) listing every Signal, Channel, and shared `vars` key currently in the profile, with live values and a double-click-to-copy reference snippet (vars.get(...) / channels.get(...)) for use in scripts. Closed by default — opt-in config tool, no collapse-strip nag like Control Panel gets since it's not needed mid-run. Also moves Configuration out of the View menu into its own toolbar button, and makes table row hover match the selection highlight color. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Diffstat (limited to 'core/signal_processor.py')
-rw-r--r--core/signal_processor.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/core/signal_processor.py b/core/signal_processor.py
index c00df73..8abaff8 100644
--- a/core/signal_processor.py
+++ b/core/signal_processor.py
@@ -466,6 +466,13 @@ class SignalProcessor(QObject):
with self._lock:
return self._script_vars.get(name, default)
+ def list_vars(self) -> Dict[str, Any]:
+ """Snapshot of every currently-set script var. Scripts mutate
+ `vars` directly (vars['x'] = ...) rather than through set_var(), so
+ this is the only way to discover what's been assigned so far."""
+ with self._lock:
+ return dict(self._script_vars)
+
# ── Main data path ────────────────────────────────────────────────────
def on_raw_batch(self, timestamp: float, readings: List[Tuple[str, str, float]]):