|
@@ -239,7 +239,6 @@ static void TcpDataInfoAssembleSend()
|
|
|
UINT16 year;
|
|
|
UINT8 month,day,hour,minute,sec;
|
|
|
UTC8TimeType UTC8TimeTcp;
|
|
|
- UINT8 i = 0;
|
|
|
INT16 len = -1;
|
|
|
UINT8 *SendBuffer = NULL;
|
|
|
//电池工作模式的延迟转换由Maintask负责,发送频率调节由tcp负责
|
|
@@ -348,7 +347,7 @@ static void TcpDataInfoAssembleSend()
|
|
|
*(SendBuffer + 52 ) = (battBalanceoInfo>>8)&0xFF;
|
|
|
*(SendBuffer + 53 ) = battBalanceoInfo&0xFF; //均衡状态-51-54
|
|
|
*(SendBuffer + 54 ) = AppDataInfo.BattCellCount; //电压个数-55
|
|
|
- for(i=0;i<AppDataInfo.BattCellCount;i++) //单体电压
|
|
|
+ for(UINT8 i=0;i<AppDataInfo.BattCellCount;i++) //单体电压
|
|
|
{
|
|
|
*(SendBuffer + 54 + i*2 + 1) = (battCellU[i]>>8) & 0xFF;
|
|
|
*(SendBuffer + 54 + i*2 + 2) = battCellU[i] & 0xFF;
|
|
@@ -424,7 +423,7 @@ static void TcpDataInfoAssembleSend()
|
|
|
GpsToTcpInfo.gpsInfo.msgCollectionTimeUTC[3] = UTC8TimeTcp.hour & 0xFF; //hour
|
|
|
GpsToTcpInfo.gpsInfo.msgCollectionTimeUTC[4] = UTC8TimeTcp.minute & 0xFF; //mins
|
|
|
GpsToTcpInfo.gpsInfo.msgCollectionTimeUTC[5] = UTC8TimeTcp.second & 0xFF;
|
|
|
- osStatus_t ret = osMessageQueueGet(GpsRecvHandle,(UINT8 *)&GpsRecvData,0,100);
|
|
|
+ osStatus_t ret = osMessageQueueGet(GpsRecvHandle,(UINT8 *)&GpsRecvData,0,1000);
|
|
|
if(ret == 0)
|
|
|
{
|
|
|
memcpy((UINT8 *)&GpsToTcpInfo.gpsInfo.GpsInfoData, (UINT8 *)&GpsRecvData,sizeof(GPSInfo));
|
|
@@ -611,7 +610,7 @@ static void TcpDataInfoAssembleSend()
|
|
|
send_counter++;
|
|
|
return;
|
|
|
}
|
|
|
- else if(BufferLen>200)
|
|
|
+ else if(BufferLen>200U&&BufferLen!=0xFFFFU)
|
|
|
{
|
|
|
Debug_Del_Logfile();
|
|
|
#ifdef DEBUGLOG
|