feat(M2): 实现核心/存储/网络/应用四层并端到端跑通
- 28 个源文件落地:core(device/sensor/scene/schedule/system)、hal(gpio/i2c/uart/sim)、 protocol(crc/frame)、storage(config/logger/storage)、net(json/http_request/http_server/router)、 web(内嵌单页界面)、app(menu/cli/commands/replay/web_app)、common(新增 bitops.c) - 全文件在 -std=c17 -Wall -Wextra -Wpedantic -Werror 下零告警 跨模块缺陷修复(集成阶段发现): 1. HAL I2C 字节序与业务层不一致(模拟后端小端 / sensor.c 按大端解析), 导致 16 路采样全部被判「传感器故障」、温度显示 125.0℃;统一为大端后 读数恢复 20.4℃ / 50.0%RH,报警等级「正常」 2. 采样路数固定 16 路导致同一探头重复 16 条;改为「传感器设备台数(至少 1 路)」, system_tick 与 CLI sensors 命令保持一致 3. 补齐 app.h 中缺失的 app_run_web()(新增 src/app/web_app.c),并给监听套接字 设 1 秒接收超时,使服务主循环得以周期性推进 system_tick 4. 收敛接口约束:schedule.h 只读矩阵接口去 const(C17 -Wpedantic 不允许 非 const → const 的二维数组隐式转换);system_save/system_render_dashboard 形参同步去 const;网页 JS 由整段字面量改为分段字面量 + 首次拼装(ISO C99 强制支持的 4095 字节单字面量下限);HTTP 响应体缓冲 4KB → 16KB 验证:debug/release/asan 三预设零告警构建通过;ctest 3/3;scripts/acceptance.sh A1~A7 全通过;HTTP 17 条路由实测(首页 2107B / CSS 2313B / JS 6740B / 设备列表 8 台 / 传感器 / 日志 / 报表 / 配置读写 / 协议帧 CRC 校验 / 自检 / 404 兜底);回放脚本 23/23 命令成功
This commit is contained in:
1 parent
e0cc5d578f
commit
b96d5690aa
16 files changed
+3325
-75
No files matched your search
+2
-1
@@ -83,7 +83,8 @@ set(SHS_APP_SOURCES
|
||||
src/app/menu.c
|
||||
src/app/cli.c
|
||||
src/app/commands.c
|
||||
src/app/replay.c)
|
||||
src/app/replay.c
|
||||
src/app/web_app.c)
|
||||
|
||||
add_library(shs_core STATIC ${SHS_CORE_SOURCES})
|
||||
target_include_directories(shs_core PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||
|
||||
Reference in new issue
Block a user