fix(gates): close the BOM gate hole that let new files skip the check
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.
This commit is contained in:
@@ -247,7 +247,7 @@ ioboard_bits.c ← 纯逻辑:位序组装。只依赖 <stdint.h>,主机侧
|
||||
2026-11-16 已在 **C 通道**上实测确认(信号接入 C 路 → 屏上只有 `DI_C` 显示「合」,
|
||||
其余 7 路不动),即 A 在 LSB、H 在 MSB 的位序与通道隔离都正确。
|
||||
其余 7 路尚未逐路验证;若某一路接反,症状是「该路动作时屏上亮的是另一路」。
|
||||
UI 侧的遥信页 `Drivers/BSP/UI/ui_page_yx.c`(板级开入开出 12 行已并入该页)在文件头注释里做了同样的声明。
|
||||
UI 侧的遥信页 `Drivers/BSP/UI/ui_page_yx.c` 文件头已改为引用本节(引第 3、6~7 条),不再复述。
|
||||
7. **开入是电平检测,不是通断检测**(用户口径,2026-11-16):
|
||||
本板开入测量的是**输入信号有没有 24V 高电平**,「导通」本身是测不出来的——
|
||||
外部信号必须提供 24V,仅仅把回路接通而没有电平,开入不会动作。
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Drivers/BSP/UI/ — LVGL UI 组件
|
||||
# Drivers/BSP/UI/ — LVGL UI 组件
|
||||
|
||||
> 基于 LVGL 的界面实现:菜单树、内容页、通用组件、中文字库、待机页。
|
||||
> **与 PC 模拟器共用同一套 UI 源码**(`simulator/` 只提供平台层)。
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* 模块名称:UI 中文位图字体(ui_font_cn_12,自动生成)
|
||||
* 模块功能:中文子集 12px 位图字体(宋体;含 ▶ 箭头与全角逗号补回字形)
|
||||
* 适用平台:STM32F407ZGTx / PC 模拟器(共用源码)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* 模块名称:UI Network Sink Backend (平台后端接口)
|
||||
* 模块功能:抽象 RemoDispBus 服务端的平台相关操作(LCDMEM 数据源 / 远端按键注入),
|
||||
* 使 MCU 端与 PC 模拟器共用同一份 ui_net_sink.c 协议实现
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* 模块名称:UI Network Sink Backend (MCU 实现)
|
||||
* 模块功能:RemoDispBus 服务端在 MCU 端的平台相关操作——
|
||||
* 读取 LVGL 帧缓冲(LCDMEM 数据源)与经 ui_port 注入远端按键
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* 模块名称:UI Page RunLog (运行记录内容页)
|
||||
* 模块功能:运行记录叶子节点(node 40)的内容页数据——动态列表,每条记录 2 行
|
||||
* (偶数行 = 时间戳、奇数行 = 描述),可移选分页;数据源 = sys_log API
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* 模块名称:UI Page SelfTest (自检记录内容页)
|
||||
* 模块功能:自检记录叶子节点(node 39)的内容页数据——动态列表,每条记录 2 行
|
||||
* (偶数行 = 时间戳、奇数行 = 故障描述),可移选分页;数据源 = sys_log API
|
||||
|
||||
+13
-15
@@ -75,27 +75,25 @@ typedef char yx_name_count_check[(sizeof(s_yx_name) / sizeof(s_yx_name[0]) == UI
|
||||
* 措辞沿用原开入开出页:开入「合/分」(外部 24V 有/无),开出「吸合/释放」
|
||||
* (继电器线圈被驱动/未驱动,见 ioboard.h 的开出极性宏注释)。
|
||||
*
|
||||
* 硬件层面的事实(反相链路、电平检测非通断检测、极性宏在驱动层的转换、位序与开出极性
|
||||
* 的验证状态)详见 Drivers/BSP/IOBOARD/README.md 第 6 节第 3、6~7 条。
|
||||
* 本文件不复述,避免两处详述漂移后互相矛盾。
|
||||
*
|
||||
* 这 12 行能看到什么、看不到什么(与 33 行点表遥信同等对待,别把板级状态当点表事实):
|
||||
* 1. 开出这 4 行显示的是**软件影子寄存器**(ODR 镜像)——"我们让这一路吸合了",
|
||||
* 不是继电器机械触点真闭合的实测反馈,本平台没有辅助触点回读通路。
|
||||
* 2. 驱动里的 ioboard_do_read_level() 读的同样是 ODR,故它读回与本页恒等;
|
||||
* 它只用来发现"有人在驱动之外写了这 4 根引脚的 ODR",不证明光耦导通。
|
||||
* 3. 开出极性宏 IOBOARD_DO_LEVEL_ACTIVE 尚未按原理图核对;即便如此本页显示仍按
|
||||
* 软件 mask 语义(极性在驱动层转换),只是结论只能算"按软件意图显示"。
|
||||
* 4. 开入位序**已部分验证**:2026-11-16 在 C 通道实测——信号接入 C 路时只有 DI_C
|
||||
* 显示「合」、其余 7 路不动,即"A 在 LSB、H 在 MSB"的位序与通道隔离成立。
|
||||
* 其余 7 路尚未逐路验证;某一路接反的症状是该路动作时亮的是另一路。
|
||||
* 逐路验证方法见 docs/硬件平台/开入开出实施说明.md §5.1。
|
||||
* 4b. 开入测的是**电平不是通断**(用户口径 2026-11-16):要的是输入有没有 24V 高电平,
|
||||
* 仅仅把回路导通测不出来。板上是反相链路(有 24V → 光耦导通 → 74HC165 引脚被拉低),
|
||||
* 这个反相在驱动层由 ioboard.h 的 IOBOARD_DI_LEVEL_ACTIVE 转换,所以本页拿到的 mask
|
||||
* 里 1 恒表示"有信号",本页不必也不应再判极性。
|
||||
* 5. 这 12 行与上面 33 行**没有任何映射关系**:上面是 104 点表(协议事实、经 iec104 上送),
|
||||
* 3. 这 12 行与上面 33 行**没有任何映射关系**:上面是 104 点表(协议事实、经 iec104 上送),
|
||||
* 这里是板级 GPIO/74HC165 物理状态(未进点表、不上送)。同屏只是"一屏看全"。
|
||||
* 6. valid 为 0 时显示「--」而不是「分/释放」:此时 mask 里可能还留着上一次的值,画成
|
||||
* 4. valid 为 0 时显示「--」而不是「分/释放」:此时 mask 里可能还留着上一次的值,画成
|
||||
* "分"等于把"没数据"伪装成"已复归"。真板子上开出四行会正常显示「吸合/释放」
|
||||
* (板端 feed 走 ioboard_do_get() 取得到影子,dio_do_valid=1);只有 PC 模拟器构建
|
||||
* 没有 ioboard 硬件时才恒为 0 显示「--」。上板看到「--」先查 feed 侧,不要改本页判定。
|
||||
* 5. 拼接边界与页数:行 0~32 = 33 点遥信(下标即 104 点表 IOA-1),行 33~44 = 板级
|
||||
* 开入开出(DI_A..DI_H + KO6/TRIP/ERT/CLZ,名表见下方 s_dio_name);合计
|
||||
* 33 + 12 = 45 行,45 / 8 行每页 = 5 满页 + 1 余页 = 6 页。拼接是**纯行号偏移**:
|
||||
* 没有第二套取数分支边界要维护,pg_refresh 里 `a_row >= UI_DATA_YX_N` 即转板级段。
|
||||
*/
|
||||
#define DIO_ROW_N ((uint16_t)(UI_DATA_DI_N + UI_DATA_DO_N))
|
||||
#define DIO_DI_ON "合"
|
||||
@@ -188,7 +186,7 @@ static void pg_sync(void) {
|
||||
}
|
||||
|
||||
/*
|
||||
* 函数功能:总行数(固定 33 点,不随有效性增减)
|
||||
* 函数功能:总行数(固定 45 行 = 33 点遥信 + 12 行板级开入开出,不随有效性增减)
|
||||
* 入口参数:无
|
||||
* 返回值:行数 uint16_t
|
||||
* 限定条件:框架绘制/翻页链内
|
||||
@@ -201,7 +199,7 @@ static uint16_t pg_count(void) {
|
||||
|
||||
/*
|
||||
* 函数功能:逐行取数(名 = 固定名表,值 = 三个位图映射出的词)
|
||||
* 入口参数:a_row - 行下标(0..32) uint16_t
|
||||
* 入口参数:a_row - 行下标(0..32 = 点表遥信,33..44 = 板级开入开出) uint16_t
|
||||
* a_name - 名输出缓冲(UI_BUF_STRLEN) char *
|
||||
* a_value - 值输出缓冲 char *
|
||||
* 返回值:无
|
||||
@@ -264,7 +262,7 @@ static void pg_refresh(uint16_t a_row, char *a_name, char *a_value) {
|
||||
|
||||
/*
|
||||
* 页面描述符(外部链接:生成物 ui_page_registry.c 按菜单树 #page=yx 绑定引用):
|
||||
* 固定 33 行的动态页(rows=NULL + count_cb/refresh),8 行/页 = 5 页;band_h 必须 >0
|
||||
* 固定 45 行的动态页(rows=NULL + count_cb/refresh),8 行/页 = 5 满页 + 1 余页 = 6 页;band_h 必须 >0
|
||||
* (selectable 页选中行是黑字,无白带即不可见,同记录页约定)
|
||||
*/
|
||||
const content_page_def_t ui_page_yx_desc = {
|
||||
|
||||
Reference in New Issue
Block a user