2b466b85f0
New read-only content page under 实时数据 → 开入开出 showing the board's
8 opto inputs (DI_A..DI_H, 合/分) and 4 relay outputs (KO6/TRIP/ERT/CLZ,
吸合/释放) as a 12-row list, 8 rows per page, 2 pages.
Data path reuses the existing de-bounced input poll instead of adding a
second hardware reader:
defaultTask (50 ms) → ioboard_di_snap_publish() → de-bounced snapshot
→ ioboard_di_snap_lookup() [new registration channel]
→ ui_data_feed_tick() (uiTask, 200 ms)
→ ui_data_rt_t.dio_di_* / dio_do_*
No new critical sections, no new hardware access on the UI path. Outputs
come from the volatile shadow register (a memory read, no lock).
Semantic honesty, recorded in ui_page_di_do.c and README §6:
· Output state is the software shadow register (ODR mirror), NOT a
mechanical contact feedback — this platform has no auxiliary contact
readback path. ioboard_do_read_level() also reads ODR, so comparing
the two is tautological.
· IOBOARD_DO_LEVEL_ACTIVE polarity has not been checked against the
schematic.
· Input bit order has not been verified by manual shorting. The
2026-11-16 run read 0x00 eight times because the operator had no time
to short each channel — the data path itself was fine.
· Board-level inputs are deliberately kept out of the 33-point telemetry
bitmap (IEC 104 point-table semantics); the two have no mapping.
Invalid snapshots render "--", never 合/分 or 吸合/释放: painting "no data"
as "all inputs released" would tell the field the inputs are open when we
simply failed to read them.
Board-verified 2026-11-16: page 1 shows 分 on all 8 inputs, page 2 shows
释放 on all 4 outputs, page footer and paging correct. Input bit order
still pending manual shorting.
Also: regenerate ui_font_cn_12 for 吸/释, add golden references for both
pages, align check_menu_rows.py L2 geometry with the now-4-item submenu,
and register the new source file in both the Keil project and CMake.
Reviewed independently; zero blocking findings.
simulator/tests/ — UI 模拟器无头回归测试
PC 端无头(headless)UI 像素回归测试:在模拟器中渲染各页面,与黄金参考图比对, 检测 UI 改动是否引入像素级回归。属于
ui-verifyskill 五步门禁的一部分。
文件一览
| 文件 | 作用 |
|---|---|
check_menu_rows.py |
菜单像素回归:渲染菜单行 → 与黄金参考比对 |
check_content_pages.py |
内容页回归:各内容页渲染比对 |
check_remo_sink.py |
推流(RemoDispBus)回归:接收端渲染比对 |
regen_ref_png.py |
由 ref/*.bin 批量出目检 PNG(不产生基准;基准由 check_content_pages.py --update 刷) |
ref/*.bin |
像素黄金参考(入库):74 张 × 3200 B,160×160 单色打包(2026-10-29 录波 UI 道 +6 张;2026-11-04 SNTP 设置页 +8 张) |
使用方式
# 跑回归(按 ui-verify skill 流程)
& '.venv\Scripts\python.exe' simulator/tests/check_menu_rows.py
& '.venv\Scripts\python.exe' simulator/tests/check_content_pages.py
# UI 有意变更、确认无误后重建基准
& '.venv\Scripts\python.exe' simulator/tests/regen_ref_png.py
⚠️ 注意
- 重建黄金参考前必须确认变更是有意的——否则会把 bug 固化成"基准"
ref/*.bin已入库:刷参考 = 改基准,git diff里会显形,提交正文必须写明为什么变ref/*.png只是给人看的派生物(已忽略),刷完.bin要重跑regen_ref_png.py才对得上- UI 改动一律走
ui-verifyskill 五步门禁(regression 是其中一步) - 依赖模拟器已构建(
simulator/build_sim.bat)
相关文档
docs/UI设计/UI_自动化测试流程.md— ui-verify 五步门禁docs/UI设计/LVGL模拟器部署与使用说明.md