Browse Source

华菱项目软件暂存,故障诊断有重启问题

LAPTOP-KB7QFH2U\ChenJie-PC 2 years ago
parent
commit
10199a73d1

+ 2 - 5
System/Vehicle/AppFunc.c

@@ -63,6 +63,7 @@ void LockAndUnlockCtrl()
 		{
 		{
 		case DriveMode: //行车状态,自动进入,默认状态
 		case DriveMode: //行车状态,自动进入,默认状态
 		{
 		{
+			ebcd_st_SwitchCtrlFlg = Lock;
 			PSwtDrv_Interface(_PSWT_INDEX_EBCLEDCONTROL, 0); //行车状态换电指示灯关闭
 			PSwtDrv_Interface(_PSWT_INDEX_EBCLEDCONTROL, 0); //行车状态换电指示灯关闭
 			if (bled_flg_handShake == 1)
 			if (bled_flg_handShake == 1)
 			{
 			{
@@ -173,7 +174,7 @@ void GetHVLockState(void)
 	}
 	}
 	else
 	else
 	{
 	{
-		m_flg_HVlock1 = 1;
+		m_flg_HVlock1 = 0;
 	}
 	}
 	//互锁2检测,高有效,悬空为0则未接入,高电平为1则接入,
 	//互锁2检测,高有效,悬空为0则未接入,高电平为1则接入,
 	m_flg_HVlock2 = DINDrv_GetChanState(_DIN_INDEX_PLUGHVLOCK);
 	m_flg_HVlock2 = DINDrv_GetChanState(_DIN_INDEX_PLUGHVLOCK);
@@ -210,10 +211,6 @@ void GetDIOState(void)
 	temp[1] = !DINDrv_GetChanState(_DIN_INDEX_LOCKSENSOR2);
 	temp[1] = !DINDrv_GetChanState(_DIN_INDEX_LOCKSENSOR2);
 	temp[2] = !DINDrv_GetChanState(_DIN_INDEX_LOCKSENSOR3);
 	temp[2] = !DINDrv_GetChanState(_DIN_INDEX_LOCKSENSOR3);
 	temp[3] = !DINDrv_GetChanState(_DIN_INDEX_LOCKSENSOR4);
 	temp[3] = !DINDrv_GetChanState(_DIN_INDEX_LOCKSENSOR4);
-	temp[0] = 1;
-	temp[1] = 1;
-	temp[2] = 1;
-	temp[3] = 1;
 	ebcd_st_lockSensor = (getbit(temp[3], 0) << 3) | (getbit(temp[2], 0) << 2) | (getbit(temp[1], 0) << 1) | (getbit(temp[0], 0) << 0);
 	ebcd_st_lockSensor = (getbit(temp[3], 0) << 3) | (getbit(temp[2], 0) << 2) | (getbit(temp[1], 0) << 1) | (getbit(temp[0], 0) << 0);
 
 
 	//落座传感器检测,高有效,悬空为0则未接入,高电平为1则接入
 	//落座传感器检测,高有效,悬空为0则未接入,高电平为1则接入

+ 1 - 1
System/Vehicle/Communication/BleCanProtocolFunc.c

@@ -932,7 +932,7 @@ void Uds_Service(uint8 *Data)
             }
             }
             case 0x04:
             case 0x04:
             {
             {
-            	BattHvCtl = *(Data + 2);
+            	ebcd_flg_ebcManCtrlEn = 0;
             	UdsPosAns(UdsAns);
             	UdsPosAns(UdsAns);
             	break;
             	break;
             }
             }

+ 2 - 2
System/Vehicle/Communication/CANNet.c

@@ -95,7 +95,7 @@ void CANNet_RecvMsgCAN0(MCANDrv_infoMsgS_TYPE infoMsgS)
 	infoVcuSendMsg.CanID = infoMsgS.infoConfS.infoMsgIDUI;
 	infoVcuSendMsg.CanID = infoMsgS.infoConfS.infoMsgIDUI;
 	memcpy(infoVcuSendMsg.CanData,infoMsgS.datMsgUBA,8);
 	memcpy(infoVcuSendMsg.CanData,infoMsgS.datMsgUBA,8);
 	VcuSendFlg = TRUE;
 	VcuSendFlg = TRUE;
-	if((infoVcuSendMsg.CanID&0x0000FFFF)==0x0000F3D0||(infoVcuSendMsg.CanID&0x0000FFFF)==0x000015F6||(infoVcuSendMsg.CanID&0x0000FFFF)==0x000051ED)
+	if((infoVcuSendMsg.CanID&0x0000FFFF)==0x0000F3D0||(infoVcuSendMsg.CanID&0x0000FFFF)==0x000015F6||(infoVcuSendMsg.CanID&0x0000FFFF)==0x000051ED||(infoVcuSendMsg.CanID&0x0000FFFF)==0x1C00EDEA)
 	{
 	{
 		CANNet_infoMsgTxConfSA[1].infoMsgIDUI = infoVcuSendMsg.CanID;
 		CANNet_infoMsgTxConfSA[1].infoMsgIDUI = infoVcuSendMsg.CanID;
 		infoMsgS.infoConfS = CANNet_infoMsgTxConfSA[1];
 		infoMsgS.infoConfS = CANNet_infoMsgTxConfSA[1];
@@ -126,7 +126,7 @@ void CANNet_RecvMsgCAN1(MCANDrv_infoMsgS_TYPE infoMsgS)
 	BmsSendFlg = TRUE;
 	BmsSendFlg = TRUE;
 	CANNet_infoMsgTxConfSA[0].infoMsgIDUI = infoBmsSendMsg.CanID;
 	CANNet_infoMsgTxConfSA[0].infoMsgIDUI = infoBmsSendMsg.CanID;
 	static uint8 TmsErrorFltTemp = 0;
 	static uint8 TmsErrorFltTemp = 0;
-	if((infoBmsSendMsg.CanID==0x1880D0F3)&& 1)//主负继电器状态和主正一起发出  加TMS故障屏蔽
+	if((infoBmsSendMsg.CanID==0x1880D0F3)&& 0)//主负继电器状态和主正一起发出  加TMS故障屏蔽
 	{
 	{
 		uint8 DataTemp = 0x00;
 		uint8 DataTemp = 0x00;
 		if(((infoBmsSendMsg.CanData[1]>>4)&0x03)==0x02)//主负继电器状态和主正一起发出
 		if(((infoBmsSendMsg.CanData[1]>>4)&0x03)==0x02)//主负继电器状态和主正一起发出

+ 0 - 1
System/Vehicle/Communication/CanVar.c

@@ -395,7 +395,6 @@ uint16 ebcd_Nr_swapSucBatt; //
 uint16 ManuControlTimes = 0;
 uint16 ManuControlTimes = 0;
 uint16 LockDelayTime = 0;	//锁定延时时间(传感器到位以后延时多少时间确定为锁定成功
 uint16 LockDelayTime = 0;	//锁定延时时间(传感器到位以后延时多少时间确定为锁定成功
 uint16 UnlockDelayTime = 0; //解锁延时时间(传感器到位以后延时多少时间确定为解锁成功
 uint16 UnlockDelayTime = 0; //解锁延时时间(传感器到位以后延时多少时间确定为解锁成功
-
 uint8 sfmv_Num_FltEEsave = 0;
 uint8 sfmv_Num_FltEEsave = 0;
 #define EEPDATA_STOP_SEC_VAR
 #define EEPDATA_STOP_SEC_VAR
 #include "MemMap.h"
 #include "MemMap.h"