summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-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]]):