|
@@ -524,7 +524,7 @@ static void TcpDataInfoAssembleSend()
|
|
|
VerMsgToTcpInfo.VerInfo.BmsInfo = BMS_INFO;
|
|
|
VerMsgToTcpInfo.VerInfo.DataModuleType = DATA_MODULE_TYPE;
|
|
|
VerMsgToTcpInfo.CRC = bcc_chk((UINT8 *)&VerMsgToTcpInfo, sizeof(VerMsgToTcpInfo) - 1);
|
|
|
- if (NB_Fota_update_flag == FALSE)
|
|
|
+ if (NB_Fota_update_flag == FALSE && BMS_Fota_update_flag == FALSE)
|
|
|
{
|
|
|
len = tcpipConnectionSend(socContext.id, (UINT8 *)&VerMsgToTcpInfo, sizeof(VerMsgToTcpInfo), 0, 0, 0);
|
|
|
if (len > 0)
|
|
@@ -539,21 +539,26 @@ static void TcpDataInfoAssembleSend()
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- if (send_counter % 10 == 0)
|
|
|
+ UINT8 DebugFeq = 1;
|
|
|
+ if (send_counter % DebugFeq == 0)
|
|
|
{
|
|
|
DebugMsgtoTcpType DebugMsgInfo;
|
|
|
UINT16 BufferLen = 0;
|
|
|
UINT8 rbuf[1000];
|
|
|
- sprintf((char *)rbuf, "%x,%d,%d,%d,,\
|
|
|
- %d,%d,%d,%d,,\
|
|
|
- %d,%d,%d,%d,%d,%d,%d,,\
|
|
|
- %d,%d,%d,%d,%d,%d,%d,,\
|
|
|
- %d,%d",
|
|
|
- battProtectState, AppDataInfo.RelayControl, chargerConnectState, PowerVoltage,
|
|
|
- tmsd_st_heatAct, sfmd_num_fltNum, sfmd_st_fltAct, sfmd_st_fltLevel,
|
|
|
- socd_pct_ahSoc, socd_pct_ekfSoc, socd_pct_estSoc, socd_pct_battSoc, socd_pct_bcuSoc, battSOC * 10, sohv_Q_packCapArrEo[9],
|
|
|
- sohd_Q_chrgEo, sohd_flg_chrgEndEo, cand_Nr_cellNr, cand_Q_cellCap, cand_V_chrgStartStat, cand_Q_reqCp, cand_Q_totalCp,
|
|
|
- AppDataInfo.ExpiryTimeArray[1], AppDataInfo.ExpiryTimeArray[2]);
|
|
|
+ if (send_counter % (60 / DebugFeq) == 0)
|
|
|
+ {
|
|
|
+ sprintf((char *)rbuf, "A-%x,%d,%d,%x,%x,%d,%d",
|
|
|
+ battProtectState, AppDataInfo.RelayControl, chargerConnectState, PowerVoltage, BMSupdatestatus,
|
|
|
+ AppDataInfo.ExpiryTimeArray[1], AppDataInfo.ExpiryTimeArray[2]);
|
|
|
+ }
|
|
|
+ else if (send_counter % DebugFeq == 0)
|
|
|
+ {
|
|
|
+ sprintf((char *)rbuf, "B-%d,%d,%d,%d,%d,%d,\
|
|
|
+ %d,%d,%d,%d,%d,%d,%d,%f,%f",
|
|
|
+ socd_pct_ahSoc, socd_pct_ekfSoc, socd_pct_estSoc, socd_pct_battSoc, socd_pct_bcuSoc, battSOC * 10,
|
|
|
+ battI, maxCellVol, minCellVol, battCellU[0], battCellU[1], test_efkSocMin, test_efkSocMax, test_UpMin, test_UpMax);
|
|
|
+ }
|
|
|
+
|
|
|
BufferLen = strlen(rbuf);
|
|
|
SendBuffer = malloc(BufferLen + sizeof(DebugMsgInfo));
|
|
|
memcpy(SendBuffer + sizeof(DebugMsgInfo) - 1, rbuf, BufferLen);
|