feat(vd960DBN): offlog TIME_ANCHOR 严格用平台下发 unix_ts

offlog_time_anchor 原丢弃传参内部重取 dev_time_now() (毫秒级误差),
改为 offlog_evt_ts() 直接写入平台下发值, 锚点事件与平台 ts 严格一致。
新增单测 test_time_anchor_exact, 7 例 ALL PASS
This commit is contained in:
wangfq
2026-08-04 18:10:18 +08:00
parent 2b1e888a73
commit 90755bf465
3 changed files with 30 additions and 4 deletions
+5
View File
@@ -711,10 +711,15 @@ TCP 超时要等 ~2 分钟才触发 `SINT_STAT_TIM_OUT`,
**附带收益**:栈上缓冲 2048→1024,每处省 1KB 栈(CH32V208 栈紧张,中断路径 832/1322 在回调/主循环调用)。
## 2026-08-04 — offlog: TIME_ANCHOR 严格使用平台下发 unix_ts
`offlog_time_anchor()` 原为丢弃传参、内部重取 `dev_time_now()`(毫秒级误差)。改为 `offlog_evt_ts()` 直接写入平台下发值,锚点事件与平台 ts **严格一致**。新增单测 `test_time_anchor_exact`(传 1800000000 验证写入值),7 例 ALL PASS。
## 修订记录
| 版本 | 时间 | 说明 |
|------|------|------|
| V3.8 | 2026-08-04 | offlog: TIME_ANCHOR 严格用平台下发 unix_ts (offlog_evt_ts), 单测 7 例 |
| V3.7 | 2026-08-04 | tcp_json_srv 缓冲宏化: data_json[2048]→TCP_JSON_DATA_BUF_LEN(1024), 省栈1KB×3 |
| V3.6 | 2026-08-04 | 脱机事件日志系统: W25Q32 256KB 环形(8064条) + BOOT/网络/事件/线圈/时钟锚点 8 类事件 + 掉电恢复 + gcc 单测 6 例 |
| V3.5 | 2026-07-23 | 保活精简(去heartbeat+IWDG) + SocketSend故障恢复(3次失败重连+重建socket) |