refactor: 新增 misc_counter 替代 report_counter 做时间戳

- Loop154_States 新增 misc_counter (50ms 自由运行不复位)
- 7处时间戳操作改用 misc_counter: passtime_start/last_exit_tick/misc_value
- report_counter 还原原始清零逻辑, 仅管上报间隔
- 删除 last_report_tick

这样 report_counter 只管上报调度, misc_counter 只管时间戳,
互不干扰, 即使 report_counter 清零也不影响车间距/通过时间计算
This commit is contained in:
wangfq
2026-07-03 10:33:48 +08:00
parent b49797ecc6
commit 5aa8edc1ea
3 changed files with 13 additions and 12 deletions
@@ -190,8 +190,8 @@ typedef struct {
* 全局状态
*===========================================================================*/
typedef struct {
uint32_t report_counter; // 上报间隔计数器 (50ms tick, 自由运行不复位)
uint32_t last_report_tick; // 上次上报时刻, 用于增量判断
uint32_t report_counter; // 上报间隔计数器 (50ms tick)
uint32_t misc_counter; // 杂项时间戳计数器 (50ms tick, 自由运行不复位)
uint8_t report_misc_round; // 空闲轮转: 0=MISC_TYPE_TIME, 1=CUT, 2=FLOW, 3=RELAY
Loop154_Unit loop_unit[LOOP_CAPTURE_MAX];
} Loop154_States;