fix: 修复负载电流读取、继电器逻辑与状态机问题
1. apps/chrg/applications/thread/chrg_north.c: 注释掉IDX_SET_SINK_CC_BEFORE_PD状态赋值 2. apps/chrg/applications/utils/chrg_eload.c: 调整真实电流读取位置,避免被覆盖 3. apps/chrg/applications/thread/chrg_roll_sou.c: 启用并调整继电器切换延时,修复继电器控制逻辑 4. apps/chrg/applications/utils/chrg_sink.c: 新增电流确认状态变量,优化批量寄存器配置与工作模式判断
This commit is contained in:
@@ -335,6 +335,8 @@ int chrg_eload_parse (rt_uint8_t idx, rt_uint8_t pt, rt_uint8_t *data, rt_uint16
|
||||
pLOAD->vpkn = swap_u16(pP1->Vpkn);
|
||||
pLOAD->vpp = swap_u16(pP1->Vpp);
|
||||
pLOAD->Ripple = swap_u16(pP1->Ripple);
|
||||
/* 保留功率板返回的真实电流,供卸载保护判断使用。 */
|
||||
pSW->Now_current = pLOAD->current;
|
||||
/*
|
||||
* 低于2V时直接清零量测结果。只清理量测字段,保留工作状态、
|
||||
* 故障、模式及测试结果,避免影响通道状态判断。
|
||||
@@ -350,7 +352,6 @@ int chrg_eload_parse (rt_uint8_t idx, rt_uint8_t pt, rt_uint8_t *data, rt_uint16
|
||||
pSW->VF = 0;
|
||||
}
|
||||
pSW->Now_voltage = pLOAD->voltage;
|
||||
pSW->Now_current = pLOAD->current;
|
||||
/* 电压、电流均更新完成后再发布序号,避免状态机读取到半更新数据。 */
|
||||
g_eload_sample_seq[idx]++;
|
||||
#if LCD_OPEN
|
||||
|
||||
Reference in New Issue
Block a user