fix: 修复电子负载通信相关问题并优化批量发送逻辑

1. 修改apps/chrg/applications/utils/chrg_eload.c:移除idx为0时的LCD显示条件代码,修复文件末尾换行缺失
2. 修改apps/chrg/applications/thread/chrg_comm.c:移除冗余的全局指针变量,优化调试打印信息
3. 修改apps/chrg/applications/thread/chrg_roll_sou.c:新增电流命令覆盖逻辑,优化线程接收超时配置,移除不必要的延时
This commit is contained in:
yhf
2026-07-19 15:37:54 +08:00
parent b68ffe3bf3
commit 2ba4fc16b7
3 changed files with 2 additions and 375 deletions
+1 -3
View File
@@ -537,8 +537,6 @@ eMBException funcReadHoldingRegister (rt_uint8_t *reqFrame, rt_uint16_t reqLen,
rt_uint8_t *resFrame, rt_uint16_t *resLen)
{
rt_uint16_t regAddress = 0, cntReg = 0;
struct chrg_north_t *pNOR = &chrgnorth;
struct chrg_switch_t *pSW = &pNOR->sw[0];
eMBException eStatus = MB_EX_NONE;
eMBErrorCode eRegStatus;
@@ -562,7 +560,7 @@ eMBException funcReadHoldingRegister (rt_uint8_t *reqFrame, rt_uint16_t reqLen,
} else {
*resLen = 3+cntReg * 2;
}
rt_kprintf("------COM VOLT =%d -------\n------COM CURR =%d-------", pSW->Now_voltage,pSW->Now_current);
rt_kprintf("------COM READ addr=%d count=%d-------\n", regAddress, cntReg);
return eStatus;
}