docs: 补充 V2.8~V3.1 开发日志 (编译修复/车间距/misc_counter/上电抑制)

This commit is contained in:
wangfq
2026-07-03 17:01:09 +08:00
parent acb999a881
commit a73a9392bd
2 changed files with 162 additions and 0 deletions
+37
View File
@@ -168,10 +168,47 @@ misc_value = (report_counter - passtime_start) / 2;
---
## 2026-07-03 — ARMCC 编译修复 + 时间戳/上报完善 (V2.8~V3.1)
### 1. ARMCC 编译错误修复 (V2.8)
- **#991**: `g_loop_states` 初始化去多余嵌套大括号 `{{0}, {{{0}}}}``{0}`
- **#177-D**: 删除未引用变量 `_counter1_init`
- **#188-D**: 7处 `at32_led_*()` 调用加 `(led_type)` 强转
### 2. 车间距时间补齐 (V2.9)
`Loop154_Unit` 新增 `last_exit_tick` 字段:
- **进场**: `misc_value = misc_counter - last_exit_tick`(车间距,首车=0
- **离场**: 记录 `last_exit_tick = misc_counter``misc_value = misc_counter - passtime_start`(通过时间)
- 四通道独立计算,50ms tick 单位
### 3. report_counter 清零导致下溢修复 (V3.0)
**根因**: `report_counter` 被 UART 上报清零后,`last_exit_tick`/`passtime_start` 存旧值,再次进场时差值下溢 → `0xFFFFFFF7`
**修复**: 新增 `misc_counter` 独立自由运行计数器(50ms,永不归零),所有时间戳操作改用 `misc_counter`
```
Loop154_States:
report_counter → 上报间隔调度 (会清零)
misc_counter → 时间戳 (永不清零)
```
`report_counter` 只负责上报调度,`misc_counter` 负责时间量计算,互不干扰。
### 4. 上电 3 秒抑制上报 (V3.1)
`uart_report_packet_loop_acs` 开头新增检查:`misc_counter < 60`3s @50ms)时跳过上报并清零 `report_counter`,等线圈基线稳定后再开始主动上报。
---
## 修订记录
| 版本 | 时间 | 说明 |
|------|------|------|
| V3.1 | 2026-07-03 | 上电3秒抑制主动上报 |
| V3.0 | 2026-07-03 | misc_counter 自由运行替代 report_counter 做时间戳 |
| V2.9 | 2026-07-03 | 补齐车间距时间 (gap time) |
| V2.8 | 2026-07-03 | ARMCC 编译修复 (多余大括号/未引用变量/枚举混用) |
| V2.7 | 2026-07-03 | report_counter 改 50ms tick,时间量单位 10ms→50ms |
| V2.6 | 2026-07-03 | misc_value 时间量单位 5ms→10ms |
| V2.5 | 2026-06-29 | 稳定期窗口 100 快速收敛 |