diff options
| author | Christian Kolset <christian.kolset@gmail.com> | 2026-06-09 22:14:20 -0600 |
|---|---|---|
| committer | Christian Kolset <christian.kolset@gmail.com> | 2026-06-09 22:14:20 -0600 |
| commit | 7aec470acd69e9c1810b40aa5eea9b96b9eb73ad (patch) | |
| tree | 9146091077ec64ed1437621ebf2725edf987801f /ui/main_window.py | |
| parent | b138e72d6f81cf58f27c6c1e4ce65cfebbb58624 (diff) | |
Scripting: named signal vars, shared vars dict, control scripts, code templates
- Named variables in expressions: source channel IDs injected as Python
identifiers alongside x[] (e.g. write `A0 * 2` instead of `x[0] * 2`)
- Shared `vars` dict on SignalProcessor accessible from all expressions,
functions, and control scripts; persisted in .labdaq profiles
- Per-derived-channel `state` dict for persistent computation state in
custom scripts
- Control widgets gain optional on_action_script (Python snippet with
value, vars, channels, math in scope); syntax-checked in editor dialog
- Built-in derived kinds (derivative, rms, power, etc.) now show their
Python implementation as read-only code previews; "Edit as Custom Script"
converts to custom_script kind with template pre-filled
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'ui/main_window.py')
| -rw-r--r-- | ui/main_window.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/main_window.py b/ui/main_window.py index ebc7463..d0e0ac4 100644 --- a/ui/main_window.py +++ b/ui/main_window.py @@ -178,7 +178,7 @@ class MainWindow(QMainWindow): hsplit = QSplitter(Qt.Orientation.Horizontal); hsplit.setHandleWidth(3) - self._ctrl = ControlPanel(self.registry) + self._ctrl = ControlPanel(self.registry, processor=self.processor) self._ctrl.setMinimumWidth(200); self._ctrl.setMaximumWidth(340) self._ctrl._add_demo_widgets() hsplit.addWidget(self._ctrl) |
