12e0617909
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.
51 lines
1.9 KiB
C
51 lines
1.9 KiB
C
/*
|
|
* 模块名称:UI Network Sink Backend (平台后端接口)
|
|
* 模块功能:抽象 RemoDispBus 服务端的平台相关操作(LCDMEM 数据源 / 远端按键注入),
|
|
* 使 MCU 端与 PC 模拟器共用同一份 ui_net_sink.c 协议实现
|
|
* 适用平台:跨平台接口(MCU / PC 模拟器各提供一份实现)
|
|
* 作者:王建锋
|
|
* 创建日期:2026-09-10
|
|
* 修改记录:
|
|
* 2026-09-10 王建锋 创建初始版本(RemoDispBus 双端共用协议实现的平台抽象)
|
|
*/
|
|
#ifndef UI_NET_SINK_BACKEND_H
|
|
#define UI_NET_SINK_BACKEND_H
|
|
|
|
#include <stdint.h>
|
|
|
|
#include "ui_port.h" /* UI_FB_SIZE:显示几何与协议几何的单一来源 */
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/* 1bpp 帧缓冲尺寸 = 屏幕令牌的帧字节数(UI_SCREEN_W*UI_SCREEN_H/8 = 3200),
|
|
* 与 ui_net_sink.c 的收发缓冲同源,不再各自写死字面量 */
|
|
#define UI_NET_SINK_MONO_SIZE UI_FB_SIZE
|
|
|
|
/*
|
|
* 函数功能:读取当前 1bpp 屏幕位图(LCDMEM 应答的数据源)
|
|
* 入口参数:out - 输出缓冲(调用方分配,≥ UI_NET_SINK_MONO_SIZE 字节)
|
|
* out_size - out 容量(字节)
|
|
* 返回值:0 - 成功,-1 - 失败
|
|
* 限定条件:显示子系统已初始化
|
|
* 函数说明:MCU 端从 LVGL 帧缓冲拷贝;模拟器端读回 SDL 实际呈现像素再转 1bpp
|
|
*/
|
|
int ui_net_sink_get_lcdmem(uint8_t *out, uint32_t out_size);
|
|
|
|
/*
|
|
* 函数功能:向 UI 注入一个远端按键
|
|
* 入口参数:remo_key - 远端按键码(ui_port.h 的 UI_KEY_* 之一)
|
|
* 返回值:无
|
|
* 限定条件:输入子系统已初始化
|
|
* 函数说明:MCU 端经 ui_port_queue_key 缓存、由 keypad 回调上报;
|
|
* 模拟器端映射为 LV_KEY_* 后经 lv_group_send_data 注入
|
|
*/
|
|
void ui_net_sink_inject_key(uint8_t remo_key);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* UI_NET_SINK_BACKEND_H */
|