Files
CC-StationBroadcast/debug-eta-stopover-bug.md
T

31 lines
1.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Debug Session: eta-stopover-bug
- **Status**: [OPEN]
- **Issue**: 列车进站 ETA 仍然包含停站时间;终点站显示已正确,但 ETA 仍偏大。
- **Debug Server**: N/A
- **Log File**: N/A
## Reproduction Steps
1. 在发车牌和 Block Reader 都正常连接的情况下运行 `station_broadcast.lua`
2. 观察 `UPCOMING TRAINS` 的 ETA
3. 与 CRN 发车牌原始 ETA 对比
## Hypotheses & Verification
| ID | Hypothesis | Likelihood | Effort | Evidence |
|----|------------|------------|--------|----------|
| A | NBT 侧生成的 `announceKey` 仍未与 `create_target` 文本键完全匹配,导致没有走文本 ETA 覆盖 | High | Low | Rejected |
| B | `create_target` 文本里解析出的 ETA 本身就是“到发后/含停站”的字段,而不是进站前 ETA | Medium | Low | Inconclusive |
| C | 文本解析到了正确 ETA,但后来又被 NBT 计算值覆盖 | Medium | Low | Rejected |
| D | 同一班车在 NBT 与文本中的目的地/车次格式仍有额外差异(空格、平台、后缀) | High | Low | Rejected |
| E | `create_target` 文本切分错位,把 ETA 数值丢掉了,只留下中文单位(在 CC 中显示为 `??`) | High | Low | Confirmed |
## Log Evidence
- 屏幕证据:`TK:[Local]1123_HC-02 2`
- 屏幕证据:`NK:[Local]1123_HC-02 2`
- 屏幕证据:`TXT:-1 NBT:113 USE:113`
- 屏幕证据:`ETASTR:??`
- 结论:文本键已匹配成功,但 `etaStr` 仅剩单位文本,数值部分在切分时被错误丢弃。
## Verification Conclusion
- 根因已确认:`create_target` 文本解析错误地将第一段数字当成独立字段丢掉,导致 ETA 解析只看到中文单位。
- 下一步修复:改为将 ETA 解析为“数值 + 单位”的组合字符串,再交给 `parseEtaText()`。