change: 时间量上报单位 5ms→10ms
- 进场车间距 / 离场通过时间: misc_value = (差值)/2 - 内部时间戳保持 5ms 精度, 仅上报值转为 10ms - 更新注释和 devlog (V2.6)
This commit is contained in:
@@ -116,10 +116,40 @@ ALFA_CAP1 = 79 // α = 79/256 ≈ 0.31, @10ms → τ ≈ 32ms
|
||||
|
||||
---
|
||||
|
||||
## 2026-07-03 — 时间量上报单位改为 10ms
|
||||
|
||||
### 背景
|
||||
|
||||
`MISC_TYPE_TIME` 上报的通过时间 / 车间距原来以 5ms 为单位(直接 `report_counter - 时间戳`),与外部协议期望的 10ms 单位不一致。
|
||||
|
||||
### 方案
|
||||
|
||||
内部时间戳 `report_counter` / `passtime_start` / `last_exit_tick` 保持 5ms 精度不动,仅在上报 `misc_value` 时 `/2` 转为 10ms:
|
||||
|
||||
```c
|
||||
// 进场 — 车间距 (10ms)
|
||||
misc_value = (report_counter - last_exit_tick) / 2;
|
||||
|
||||
// 离场 — 通过时间 (10ms)
|
||||
misc_value = (report_counter - passtime_start) / 2;
|
||||
```
|
||||
|
||||
### 影响范围
|
||||
|
||||
| 位置 | 变更 |
|
||||
|------|------|
|
||||
| `TaskLoop.c` 进场路径 | `misc_value` /2 |
|
||||
| `TaskLoop.c` 离场 flatness | `misc_value` /2 |
|
||||
| `TaskLoop.c` 离场 cnt_release | `misc_value` /2 |
|
||||
| `TaskLoop.h` 注释 | 标注 `/2→10ms` |
|
||||
|
||||
---
|
||||
|
||||
## 修订记录
|
||||
|
||||
| 版本 | 时间 | 说明 |
|
||||
|------|------|------|
|
||||
| V2.6 | 2026-07-03 | misc_value 时间量单位 5ms→10ms |
|
||||
| V2.5 | 2026-06-29 | 稳定期窗口 100 快速收敛 |
|
||||
| V2.4 | 2026-06-29 | 去掉快速 IIR,ALFA_CAP1=79 @10ms |
|
||||
| V2.3 | 2026-06-29 | 基线冻结超时 + 稳定性检查 |
|
||||
|
||||
Reference in New Issue
Block a user