feat(V4B): V4.36.16 — 上电自检与重连灯语义分离

用户三条需求:
1. 上电无线圈: 绿灯黄灯都闪, 接线圈后黄灯时长<=绿灯, 自检完同灭
2. 上电有线圈: 绿灯闪自检, 黄灯不闪
3. 运行中重连: 黄灯接管(不变)

问题(V4.36.15 副作用): 上电首次 LOOP_OK 上升沿误触发判稳门控,
低Q 蠕变把黄灯拖到 2s+ 超过绿灯判稳 1.3s; 上电有线圈黄灯也闪(!power_up)
改动: 黄灯模式1 去 !power_up(无线圈由 disconnect_active 覆盖);
判稳门控触发加 g_loop_stable(仅运行中重连; 上电/安全复位不判稳)
语法0 error, 4测试全绿; spec V2.32 / manual 灯表 / devlog V2.50
This commit is contained in:
wangfq
2026-09-04 16:28:17 +08:00
parent fc070a9145
commit 13876be54c
5 changed files with 47 additions and 9 deletions
@@ -357,8 +357,11 @@ void poll_yellow_led(void)
g_fault_tick++;
/*--- 模式1: 快闪 — 当前断开中 或 从无线圈上电 ---*/
if (g_disconnect_active || g_reconn_stab || !g_loop_power_up_state) {
/*--- 模式1: 快闪 — V4.36.16 起仅"载波问题"接管 (上电自检不闪, 归绿灯):
* 运行中断开(disconnect_active) / 运行中重连判稳门控(reconn_stab) / 上电无线圈
* (LOOP_OK=0 → loop_task 断开分支置 disconnect_active)
* 上电有线圈/判稳中: 黄灯不闪, 自检指示归绿灯慢闪 ---*/
if (g_disconnect_active || g_reconn_stab) {
if (g_fault_tick >= FLT_FAST_HALF) {
g_fault_tick = 0;
LED_YELLOW_GPIO->odt ^= LED_YELLOW_PIN; // toggle
@@ -1453,9 +1456,10 @@ void loop_task_function(void *pvParameters)
g_relay_hold_cnt = 0; // V4.36.3: 保持计时复位
g_relay_hold_done = 0;
g_reconn_blank_ms = 0; // V4.36.5: 抑制倒计时(首样本直锁时按 Q 定档)
/* V4.36.15: 无车断开重连 → 判稳门控(值稳定才放行动作);
* 有车断开重连(VD_FLAG=1, 保持路径输出中)不判稳: 重连后走离开判定 */
if (loop1_VD_FLAG == 0) {
/* V4.36.15/16: 无车断开重连(运行中 stable=1) → 判稳门控(值稳定才放行);
* 有车断开重连(VD_FLAG=1, 保持路径输出中)不判稳: 重连后走离开判定;
* 上电/安全复位判稳(stable=0)不触发: 上电自检归绿灯慢闪, 黄灯不闪 */
if (loop1_VD_FLAG == 0 && g_loop_stable) {
g_reconn_stab = 1;
g_stab_ms = 0;
g_stab_step_tick = 0;