feat(ui): add DI/DO status page showing 8 inputs and 4 outputs

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.
This commit is contained in:
2026-11-16 21:45:08 +08:00
parent bdc6f2f9b8
commit 2b466b85f0
24 changed files with 1012 additions and 300 deletions
+6
View File
@@ -243,6 +243,12 @@ ioboard_bits.c ← 纯逻辑:位序组装。只依赖 <stdint.h>,主机侧
不是「继电器现在真的动没动」。后者只能靠辅助触点或万用表。
5. **PE2 / PE4 是命名残留**:硬件无信号,本驱动不配置、不读取。若 CubeMX 里还留着它们,
那是 `IN_D4` / `IN_E4` 的旧配置,不影响本驱动。
6. **开入位序未经人工验证**:8 路开入与板级丝印 `DI_A`~`DI_H` 的对应关系目前只是
**按移位顺序推定**,没有现场逐路短接核对过。2026-11-16 那一轮读过 8 次、`ok_reads` 全部正常、
但 `read` 恒为 `0x00`——原因是操作员来不及逐路短接,不是驱动故障:数据线通路本身是好的。
判定标准见 §5 第 1 步(短接某一路应读到对应位的 `0x01`/`0x80`)。
**在完成这一步之前,任何"第 n 路开入处于什么状态"的结论都只能算推定。**
UI 侧的状态页 `ui_page_di_do.c` 在文件头注释里做了同样的声明。
---