Skip to content

WaveBench v0.6.0

Choose a tag to compare

@Scaxlibur Scaxlibur released this 10 May 07:42
· 441 commits to master since this release
v0.6.0
c54254b

WaveBench v0.6.0 Release Notes / 发布说明

中文

WaveBench v0.6.0 是实验性 TUI 控制面板的第一个完整收口版本。这个版本把 WaveBench 从“主要靠 CLI/run plan 驱动”的工具,推进到可以在终端里直接查看和控制实验台状态:DP800/DP832A 电源、DM3058/DM3000 系列万用表、DG4202 信号源都已有对应 TUI 面板。

这个版本仍然保持 WaveBench 的边界:不做 LabVIEW 式平台重构,不隐藏仪器写操作,不绕过已有 service/driver 安全层。TUI 只是新增前端,底层仍复用 CLI 已验证过的 SourceServicePowerServiceDmmService 与现有配置。

新增与改进

  • 新增实验性 wavebench tui 终端控制面板,基于 Textual,可用 wavebench tui --fake 离线查看界面。
  • TUI 新增 DG4202 信号源面板,显示 output、function、frequency、Vpp、offset,并支持显式 set function、set frequency、set Vpp、toggle output。
  • TUI 电源面板继续打磨:DP800/DP832A 三通道状态压缩为更紧凑的三行显示,输出 ON、CC 模式和不同通道用颜色高亮。
  • TUI 电源 protection 面板支持 OVP/OCP 状态显示与受约束写入;写操作仍复用 PowerService.set_protection() 的安全校验。
  • TUI DMM 面板改为中英双语功能按钮,覆盖 DCV、ACV、DCI、ACI、RES、FRES、FREQ、PERIOD、CONT、DIODE、CAP。
  • DMM function 切换后新增可配置等待:[dmm].settle_ms_after_function_change,默认 500 ms,避免切挡后立即读数不稳定。
  • DMM TUI 自动读数不再每轮查询 :FUNCtion?,改用本地 active function 缓存,减少 DM3058 LAN/PyVISA 偶发 RPCUnpackError 对自动刷新链路的影响。
  • DM3058 function 状态解析兼容更多真实回读简写:CONTFREQCAP2WR4WR
  • 重复点击当前 DMM 挡位时不再重复发送 set-function,只做读数刷新,避免仪器控制卡住。
  • TUI 持久化日志默认写入 data/tui/wavebench-tui.log,并记录 session start/stop、界面日志与 adapter command log lines。
  • TUI 退出收尾硬化:q 退出时停止 refresh timer,避免继续调度后台 I/O;仪器阻塞 I/O 改为自管 daemon thread 路径,避免 asyncio 默认 executor 300 秒 join warning。
  • Source 不参与全局自动轮询;启动时读一次,手动 Refresh 可读,写操作后回读,避免把非 telemetry 的信号源状态当作高频刷新对象。
  • 本地 agent 元数据 .agents/.codex/ 已加入 .gitignore
  • 公开 README 与文档总览补充当前 TUI 用法、日志路径、退出说明和配置项。

安全与边界

  • TUI 不直接散写 SCPI;信号源、电源、万用表操作继续走现有 service/driver 层。
  • 电源写操作仍受 [safety_limits] 约束。
  • Source 输出打开前仍检查配置中的 source amplitude 上限。
  • DP800 手册复查确认没有一次返回三通道明细的 status/measurement/OVP/OCP 查询;后续若要优化刷新性能,优先考虑 round-robin 分片刷新或降低 protection 刷新频率。

English

WaveBench v0.6.0 is the first closeout release for the experimental terminal TUI control panel. It moves WaveBench beyond CLI/run-plan-only workflows toward a terminal lab-bench panel where DP800/DP832A power supplies, DM3058/DM3000-family DMMs, and DG4202 source controls can be viewed and operated directly.

The project boundary stays the same: this is not a LabVIEW-style platform rewrite, it does not hide instrument writes, and it does not bypass the existing service/driver safety layers. The TUI is only a new frontend over the already-tested SourceService, PowerService, DmmService, and configuration model.

Added and Improved

  • Added the experimental wavebench tui terminal control panel, built with Textual. Use wavebench tui --fake to inspect the UI offline.
  • Added the DG4202 source TUI panel, showing output, function, frequency, Vpp, and offset, with explicit set function, set frequency, set Vpp, and output toggle operations.
  • Polished the power TUI: DP800/DP832A three-channel status is now displayed in a compact three-row layout, with visual highlighting for ON output, CC mode, and channel rows.
  • Added/continued the power protection TUI panel for OVP/OCP status and constrained writes. Writes still go through PowerService.set_protection() safety checks.
  • Reworked the DMM TUI into bilingual function buttons covering DCV, ACV, DCI, ACI, RES, FRES, FREQ, PERIOD, CONT, DIODE, and CAP.
  • Added configurable DMM settle time after function changes: [dmm].settle_ms_after_function_change, defaulting to 500 ms.
  • DMM TUI auto-read no longer queries :FUNCtion? on every refresh. It uses a local active-function cache to reduce DM3058 LAN/PyVISA intermittent RPCUnpackError impact.
  • DM3058 function status parsing now accepts real shorthand responses such as CONT, FREQ, CAP, 2WR, and 4WR.
  • Clicking the current DMM function again is now a no-op for set-function and only refreshes the reading, avoiding a repeated set command that could stall the instrument control path.
  • TUI persistent logs now default to data/tui/wavebench-tui.log, recording session start/stop, UI logs, and adapter command log lines.
  • Hardened TUI shutdown: pressing q stops the refresh timer and prevents new background I/O scheduling. Blocking instrument I/O now uses managed daemon threads instead of the asyncio default executor path, avoiding the 300-second executor join warning.
  • Source status is no longer part of the global auto-refresh loop. It is read once on startup, can be refreshed manually, and is read back after writes.
  • Local agent metadata directories .agents/ and .codex/ are now ignored.
  • Public README and docs now describe the current TUI usage, log path, quit behavior, and configuration options.

Safety and Boundaries

  • The TUI does not scatter raw SCPI; source, power, and DMM operations still go through the existing service/driver layers.
  • Power writes remain guarded by [safety_limits].
  • Source output enable still checks the configured source amplitude limit first.
  • A DP800 manual review confirmed there is no single query returning detailed status/measurement/OVP/OCP data for all three channels. Future refresh-performance work should prefer round-robin split refreshes or lower protection refresh frequency.