fix(chrg_north): 调低低压和无电流故障的触发计数阈值

将低压故障触发计数从5次改为3次,无电流故障触发计数也从5次改为3次,加快异常状态的响应速度
This commit is contained in:
yhf
2026-07-19 17:29:01 +08:00
parent 03f1193d2e
commit 82847e41dd
+2 -2
View File
@@ -228,7 +228,7 @@ void chrg_sink_parse(rt_uint8_t *frame_data, eIDX_SOU_CH idx,
// volt_low[idx]++;
/* Treat low voltage as a fault only after voltage was once valid. */
if (volt_set_ok[idx] == 1) {
if (++volt_low[idx] >= 5) {
if (++volt_low[idx] >= 3) {
volt_set_ok[idx] = 0;
no_curr[idx] = 0;
pSW->sink.work_mode = SINK_WORK_LOW;
@@ -245,7 +245,7 @@ void chrg_sink_parse(rt_uint8_t *frame_data, eIDX_SOU_CH idx,
pSW->sink.work_mode = SINK_WORK_RUNING;
/* Voltage is normal but current is still zero: retry from WAIT. */
if (pSW->Now_current <= 200) {
if (++no_curr[idx] >= 5) {
if (++no_curr[idx] >= 3) {
pSW->sink.work_mode = SINK_WORK_WAIT;
no_curr[idx] = 0;
}