|
@@ -265,7 +265,17 @@ static void TcpDataSendFeqHandFunc(uint8* DataIdx)
|
|
TcpDataFeq.GpsFeqCnt[1] = 60;
|
|
TcpDataFeq.GpsFeqCnt[1] = 60;
|
|
TcpDataFeq.TrkBattFeqCnt[1] = 60;
|
|
TcpDataFeq.TrkBattFeqCnt[1] = 60;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ TcpDataFeq.DebugMsgFeqCnt[1] = TcpDataFeq.TrkBattFeqCnt[1];
|
|
|
|
+ //读取硬线唤醒源状态,若没有硬线唤醒,则降低调试信息发送频率
|
|
|
|
+ Dio_LevelType wakeup1,wakeup2 = STD_HIGH;
|
|
|
|
+ wakeup1 = Dio_ReadChannel(DioConf_DioChannel_PTB0_GPIO_IN_MCU_WAKEUP1);
|
|
|
|
+ wakeup2 = Dio_ReadChannel(DioConf_DioChannel_PTE2_GPIO_IN_MCU_WAKEUP2);
|
|
|
|
+ if(wakeup1==STD_LOW && wakeup2==STD_LOW)
|
|
|
|
+ {
|
|
|
|
+ TcpDataFeq.DebugMsgFeqCnt[1] = 10*60;
|
|
|
|
+ TcpDataFeq.TrkVehichleFeqCnt[1] = 10*60;
|
|
|
|
+ TcpDataFeq.GpsFeqCnt[1] = 3*60;
|
|
|
|
+ }
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
sint8 TcpDataSendFunc(sint8 ConnectId,uint8 DataSendIdxIn)
|
|
sint8 TcpDataSendFunc(sint8 ConnectId,uint8 DataSendIdxIn)
|
|
@@ -967,7 +977,7 @@ void TcpDataEncode(uint8 DataIdx,uint32 *PtrSendAddr, uint16 *SendLen)
|
|
{%.2f,%.2f,%.2f,%.2f,%.2f;\
|
|
{%.2f,%.2f,%.2f,%.2f,%.2f;\
|
|
%.2f,%.2f,%.2f,%.2f,%.2f,}\
|
|
%.2f,%.2f,%.2f,%.2f,%.2f,}\
|
|
{%.2f,%.2f,%.2f,%.2f,%.2f;\
|
|
{%.2f,%.2f,%.2f,%.2f,%.2f;\
|
|
- %.2f,%.2f,%.2f,%.2f,%.2f,},%s,%d--%d,%d,%d",
|
|
|
|
|
|
+ %.2f,%.2f,%.2f,%.2f,%.2f,},%s,%d-M-%d,P-%d,N-%d,C-%d,A-%d",
|
|
returnFreq[0][0], returnFreq[0][1], returnFreq[0][2], returnFreq[0][3], returnFreq[0][4],
|
|
returnFreq[0][0], returnFreq[0][1], returnFreq[0][2], returnFreq[0][3], returnFreq[0][4],
|
|
returnP[0][0], returnP[0][1], returnP[0][2], returnP[0][3], returnP[0][4],
|
|
returnP[0][0], returnP[0][1], returnP[0][2], returnP[0][3], returnP[0][4],
|
|
|
|
|
|
@@ -976,7 +986,7 @@ void TcpDataEncode(uint8 DataIdx,uint32 *PtrSendAddr, uint16 *SendLen)
|
|
|
|
|
|
returnFreq[2][0], returnFreq[2][1], returnFreq[2][2], returnFreq[2][3], returnFreq[2][4],
|
|
returnFreq[2][0], returnFreq[2][1], returnFreq[2][2], returnFreq[2][3], returnFreq[2][4],
|
|
returnP[2][0], returnP[2][1], returnP[2][2], returnP[2][3], returnP[2][4],tmp,DeviceErrNum,
|
|
returnP[2][0], returnP[2][1], returnP[2][2], returnP[2][3], returnP[2][4],tmp,DeviceErrNum,
|
|
- BMS_Mode,BMS_StPosRly,BMS_StNegRly);
|
|
|
|
|
|
+ BMS_Mode,BMS_StPosRly,BMS_StNegRly,BMS_CharSt,BMS_PackCurr-10000);
|
|
|
|
|
|
BufferLen = strlen((const char *)rbuf);
|
|
BufferLen = strlen((const char *)rbuf);
|
|
*SendLen = BufferLen + sizeof(DebugMsgInfo);
|
|
*SendLen = BufferLen + sizeof(DebugMsgInfo);
|
|
@@ -1078,7 +1088,7 @@ void TcpDataEncode(uint8 DataIdx,uint32 *PtrSendAddr, uint16 *SendLen)
|
|
}
|
|
}
|
|
case 0x91:
|
|
case 0x91:
|
|
{
|
|
{
|
|
- if(BMS_CellRecvCounter<128)
|
|
|
|
|
|
+ if(BMS_CellRecvCounter<min(BMS_CellTotal, BMS_CELL_MAX_NUM)/3)
|
|
{
|
|
{
|
|
*SendLen = 0; // 不发送,长度为0
|
|
*SendLen = 0; // 不发送,长度为0
|
|
return;
|
|
return;
|