Commit Graph

2 Commits

Author SHA1 Message Date
wandering1 515db819ab feat(ui): fold board inputs and outputs into the telemetry page
The 12 board-level rows now live at the end of the 遥信量 page instead of
a separate 开入开出 page: 8 opto inputs (DI_A..DI_H) and 4 relay outputs
(KO6/TRIP/ERT/CLZ). 33 rows become 45, five pages become six. The
standalone page, its menu entry, its golden references and both build
registrations are removed.

Folding the display is not folding the point table. The board rows
render from dio_di_* / dio_do_* and stay out of yx_bits / yx_valid /
yx_dp: any change to those carriers is provably absent from this diff.
IEC 104 mapping and YX_VALID_MASK are untouched, so nothing new is
reported to a master station.

Input polarity was wrong and is fixed here. On this board a 24 V input
drives the opto, which pulls the 74HC165 pin LOW, so the raw mask is
inverted relative to "has signal". The bit assembly only reordered bits;
nothing converted the level. The screen showed 分 on every channel no
matter what the operator drove in. Polarity now converts once, in the
driver, behind IOBOARD_DI_LEVEL_ACTIVE (0 = active low), so callers see
1 = has signal for both inputs and outputs.

Verified on the board: page 5 shows YX33 followed immediately by DI_A,
crossing the 33-point boundary with no drift; DI_C reads 合 because the
operator's signal is on channel C, the other seven read 分; page 6 shows
DI_H then all four outputs 释放. Page rows end at y=134, the footer
starts at y=144.

Input bit order is only partly verified: channel C was confirmed against
a real signal, the other seven have not been exercised channel by
channel. The board detects the presence of 24 V, not contact closure,
and the output rows show the shadow register (our intent) rather than
mechanical contact feedback. All three limits are recorded in the page
header and in the IOBOARD README.

Also adds a polarity guard to the host tests: the input polarity was
flipped once already, and until now no assertion would have caught a
silent re-flip, since only the DO side was pinned.
2026-11-16 23:30:35 +08:00
wandering1 345e12ebd7 test(ui-golden): 新增遥信量第 1、2 页像素参考
上一笔的两态基线单独提交(基线变化与代码变化分笔,回归时能一眼看出是图变了还是代码变了)。
- shot_yx.bin:第 1 页 8 行**全是 "--"**——位置1~4 是无硬件的双点、YX5~8 点表未定义。这一页的
  作用是把「V0.1 只有 6 点有来源」钉成图像证据:以后谁把无效位画成「复归」,或反过来把有效位
  画成横杠,都会在这里响。
- shot_yxp2.bin:第 2 页出现两个有来源的行(故障总 / 过流Ⅰ段 = 复归),同时选中行落在第 2 页
  首行(YX9)——一张图同时钉住分页数学(33 行 / 8 = 5 页)与"翻页后取值不串行"。
- 先证语义再钉像素:33 条文本断言全过之后才 --update 建基线(顺序反过来就是把错画面合法化);
  其余 19 页参考逐字节不变。
2026-10-25 15:33:43 +08:00