Commit 768639af authored by 王雅楠's avatar 王雅楠

feat:新增故障码ECU_0x402信号掉线判断

parent a4f3b9c3
#include "FaultCode.h" #include "FaultCode.h"
#include "CAN_CH0_CAN_Communication_Matrix.h"
static _st_Init FaultCodeInit; static _st_Init FaultCodeInit;
static uint16_t u16FaultCodeDtcCount = 0; static uint16_t u16FaultCodeDtcCount = 0;
static uint16_t u16FaultCodeDtcCountBack = 0; static uint16_t u16FaultCodeDtcCountBack = 0;
...@@ -395,3 +396,21 @@ uint8_t Get_FaultCode_Valid(void) ...@@ -395,3 +396,21 @@ uint8_t Get_FaultCode_Valid(void)
{ {
return u8FaultCodeValid; return u8FaultCodeValid;
} }
/*
*NAME : Get_FaultCode_Lost()
*FUNCTION : 获取发送故障码的CAN是否掉线
*RETURN : 0-LOST 1-ONLINE
*/
uint8_t Get_FaultCode_Lost(void)
{
uint8_t u8FaultCodeLost = 0;
if(CAN_MSG_Status(&CAN_CH0_CanMsgOp, CAN_CH0_ID_CH0_402_Msg_Count) == CAN_SIG_LOST)
{
u8FaultCodeLost = 0;
}
else
{
u8FaultCodeLost = 1;
}
return u8FaultCodeLost;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment