Flat-expand the board output driver from 4 to 10 channels as decided:
IOBOARD_DO_COUNT 4->10, mask uint8_t->uint16_t, IOBOARD_DO_MASK_ALL
0x03FF. The 6 new pins keep their bit positions: KO_LED1=PF2(bit4),
KO_LED2=PF3(bit5), KO_24V=PF4(bit6), KO4=PF5(bit7), KO5=PC15(bit8),
KO_LED3=PE6(bit9); the original 4 (KO6/TRIP/ERT/CLZ) keep bit0..3.
Backups-domain PC15 is used as a signal bit only (+/-3 mA limit).
No 24V supply interlock and no LED special-casing: the driver writes
KO_24V as an ordinary bit; callers needing relay power sequencing must
assert it before energizing a channel. do_write/get/read_level and the
shadow register are all uint16_t; do_apply flushes four port segments
(GPIOC/GPIOF/GPIOC/GPIOE) and do_read_level caches three port ODRs.
UI: UI_DATA_DO_N 4->10, dio_do_mask uint16_t, UI_DATA_VER 3->4 because
dio_do_valid shifts 211->212; feed mask and dio row table extended;
content-page golden references regenerated for 51 rows / 7 pages.
Host ioboard tests 127/127 and ui_data tests 305/305 pass; Keil rebuild
0 errors 0 warnings. RAM ledger, memory snapshot and size attestation
refilled from the authoritative map. Docs: ioboard spec v1.2->v1.3 and
the resolved 6-pin question closed out.
The BOM gate claimed to stop BOMs from being stripped, but it only ever
inspected files that were already tracked AND already had a BOM. A new
file under a BOM-listed directory could be born without one and never
be noticed, because the scan never returned it and, even if it had, the
"no HEAD version" branch skipped it. Editing a listed file and losing
its BOM is a real accident that already happened once; creating one
without a BOM was the same accident with no safety net at all.
Measured before and after on the same untracked file with no BOM:
before: checked 101 files, no drift, exit 0
after: FAIL, names the file, exit 1
The count of 101 was itself the symptom: with one more file present the
honest number is 102. The old code was not "silently passing a clean
tree", it was not looking.
The scan now includes untracked files, and a listed file with no HEAD
version must carry a BOM. Files that are tracked without a BOM keep
their historical pass so this does not flood existing code with
failures; instead the two that were listed but had no BOM were given one
so the list means what it says.
That exposed a conflict nobody had hit yet. The font file is generated,
and the generator rewrites it from scratch on every run, so a hand-added
BOM survived until the next regeneration and then vanished. The BOM gate
and the generated-fresh gate could not both pass. The generator now puts
the BOM back as its last step, idempotently, so the two gates agree and
the whole UI directory keeps its uniform encoding. Font content is
untouched: everything after the first three bytes is byte-identical.
The menu generator gains a real read-only mode. It previously had no
options at all and always rewrote its outputs; the arrows it printed
were accurate. That made it easy to mistake for a checker, since an
unchanged tree produces identical bytes and looks untouched. --check now
reports up to date or stale without writing anything, and the
registration tables are checked the same way. Default behaviour and
output are unchanged.
The telemetry page header no longer restates the board's input hardware
facts. They live in the IOBOARD README, which is where the board's
electrical behaviour belongs; the page keeps only what it alone can say:
that the output rows show the shadow register rather than contact
feedback, why an invalid sample draws -- instead of 分, and that these
twelve rows are not in the point table. One fact, one place.
The team rule for experiments now requires the file hash, the located
line number, and both runs. A report once cited a line number that did
not exist in the final file, which left no way to confirm which version
had actually been tested.
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.