当前版本存在偶然性失败——电压到了之后没电流
1. apps/chrg/applications/thread/chrg_north.h: 更新版本号到V1.1.22 2. apps/chrg/applications/utils/chrg_eload.c: 清理冗余注释和调试打印代码 3. apps/chrg/applications/thread/chrg_comm.c: 更新版本号到V1.1.24,重构测试模式切换逻辑,新增优先级命令处理 4. apps/chrg/applications/thread/chrg_roll_sou.c: 新增优先级命令调度逻辑,优先处理测试停止/切换命令 5. apps/chrg/applications/utils/chrg_sink.c: 更新版本号到V1.1.24,重构初始化命令构建流程,新增初始化状态跟踪,增加调试打印开关 6. docs/Allegro.jrl和docs/allegro.jrl,1: 更新Allegro设计日志文件
This commit is contained in:
@@ -407,7 +407,6 @@ int chrg_eload_parse_version (rt_uint8_t idx, rt_uint8_t *data, rt_uint16_t len)
|
||||
{
|
||||
rt_uint16_t version;
|
||||
|
||||
/* A one-register Modbus 0x03 response is 7 bytes including CRC16. */
|
||||
if ((idx >= TOTAL_SOU_CHS) || (data == RT_NULL) ||
|
||||
(len != (MODBUSRTU_SW_VERSION_LEN * 2U + 5U)) ||
|
||||
(data[0] != ID_ELOAD) || (data[1] != MB_REGISTER_RD) ||
|
||||
@@ -416,7 +415,7 @@ int chrg_eload_parse_version (rt_uint8_t idx, rt_uint8_t *data, rt_uint16_t len)
|
||||
}
|
||||
|
||||
version = u8v_to_u16(&data[3]);
|
||||
/* HOLD_REG_CH0_VERSION is the per-channel south board version register. */
|
||||
|
||||
usRegHoldBuf[HOLD_REG_CH0_VERSION + idx * TOTAL_HOLD_CH_REGS] = version;
|
||||
return 0;
|
||||
}
|
||||
@@ -443,9 +442,7 @@ int chrg_eload_parse (rt_uint8_t idx, rt_uint8_t pt, rt_uint8_t *data, rt_uint16
|
||||
return -1;
|
||||
}
|
||||
struct eload_p1_t *pP1 = (struct eload_p1_t *)&data[3];
|
||||
// for(int i = 0;i<36;i++){
|
||||
// rt_kprintf("%02x ",data[i+3]);
|
||||
// }
|
||||
|
||||
pLOAD->status1 = pP1->status1;
|
||||
pLOAD->status2 = pP1->status2;
|
||||
pLOAD->fault1 = pP1->fault1;
|
||||
@@ -465,6 +462,8 @@ int chrg_eload_parse (rt_uint8_t idx, rt_uint8_t pt, rt_uint8_t *data, rt_uint16
|
||||
pLOAD->vpp = swap_u16(pP1->Vpp);
|
||||
pLOAD->Ripple = chrg_eload_ripple_filter_update(idx,
|
||||
swap_u16(pP1->Ripple));
|
||||
// if(idx == IDX_CH3)
|
||||
// rt_kprintf("-----Ripple = %d-------\n",pLOAD->Ripple);
|
||||
/* 保留功率板返回的真实电流,供卸载保护判断使用。 */
|
||||
pSW->Now_current = pLOAD->current;
|
||||
/*
|
||||
@@ -486,14 +485,6 @@ int chrg_eload_parse (rt_uint8_t idx, rt_uint8_t pt, rt_uint8_t *data, rt_uint16
|
||||
/* 电压、电流均更新完成后再发布序号,避免状态机读取到半更新数据。 */
|
||||
g_eload_sample_seq[idx]++;
|
||||
#if LCD_OPEN
|
||||
// for(int i = 0;i<4;i++){
|
||||
// if(pNOR->sw[i].change_flag == 0x01){
|
||||
// pNOR->free_flag = 0x00;
|
||||
// }else {
|
||||
// pNOR->free_flag = 0x01;
|
||||
// }
|
||||
// }
|
||||
// rt_kprintf("ch=%d,free_flag=%d,",idx,pNOR->free_flag);
|
||||
if(pNOR->free_flag==0x01){
|
||||
LCD_SHOW(idx, pP1, pLOAD, pSW, pSOU->online[idx]);
|
||||
}
|
||||
@@ -525,7 +516,6 @@ int chrg_eload_parse (rt_uint8_t idx, rt_uint8_t pt, rt_uint8_t *data, rt_uint16
|
||||
chrg_eload_dpdm_host_value(pSW->VZ);
|
||||
usRegHoldBuf[HOLD_REG_CH0_VF+idx*TOTAL_HOLD_CH_REGS] =
|
||||
chrg_eload_dpdm_host_value(pSW->VF);
|
||||
// rt_kprintf("---------NOW VOLT END = %d\n----------",pSW->Now_voltage);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user