From 4ab2eea9af5338485303d421476fa874e5af6841 Mon Sep 17 00:00:00 2001 From: Christian Kolset Date: Mon, 21 Sep 2026 00:16:15 -0600 Subject: Fix Buffer size setting never being applied; add Safety Switch control type MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Buffer size (samples) in Settings > Acquisition was captured into the settings dict but never read anywhere — SignalBuffer always used the hardcoded MAX_BUFFER=20_000 constant (which happens to match the dialog's default, hence it looking like the value "reverts"). Add AcquisitionEngine.set_buffer_size(), wired in on startup and on Settings apply; existing buffers are rebuilt at the new size in place, keeping their most recent samples. - New "Safety Switch" control type: an On/Off Switch that's disabled outright until acquisition is running, with a lock icon shown while disabled. AcquisitionEngine gains a run_state_changed(bool) signal (emitted from start()/stop()); ControlWidget gains a _check_safety_lock() hook (no-op by default, called uniformly by ControlPanel on every widget) that SafetySwitch overrides. engine is now threaded through to every ControlWidget for this. Persists via ControlSpec.control_type alone — no schema change needed. Co-Authored-By: Claude Sonnet 5 --- ui/style_light.qss | 1 + 1 file changed, 1 insertion(+) (limited to 'ui/style_light.qss') diff --git a/ui/style_light.qss b/ui/style_light.qss index b9c8b62..1bed344 100644 --- a/ui/style_light.qss +++ b/ui/style_light.qss @@ -83,6 +83,7 @@ QWidget#controlWidgetHeader { background:#f1f5f9; border-radius:5px 5px 0 0; bor QLabel#controlWidgetIcon { font-size:14px; color:#3b82f6; padding-right:4px; } QLabel#controlWidgetTitle { font-family:"IBM Plex Mono",monospace; font-size:11px; font-weight:700; letter-spacing:1.5px; color:#64748b; } QLabel#controlWidgetStale { color:#d97706; font-size:12px; padding:0 2px; } +QLabel#controlWidgetSafetyLock { color:#64748b; font-size:12px; padding:0 2px; } QWidget#controlWidgetBody { background:#ffffff; border-radius:0 0 5px 5px; } QFrame#controlWidget[stale="true"] QWidget#controlWidgetBody { background:#fffbeb; } -- cgit v1.2.3