Commit bfcfb4f2 authored by hu's avatar hu

增加故障码J1939报文,多包处理

parent 5b28fe3a
......@@ -51,6 +51,20 @@ typedef enum
/*42*/ID_CanMsg18FECAA1_Msg_Count,
/*43*/ID_CanMsg18FECAA0_Msg_Count,
ID_CanMsg18FECA00_Msg_Count,
ID_CanMsg18FECA10_Msg_Count,
ID_CanMsg18ECFF00_Msg_Count,
ID_CanMsg18EBFF00_Msg_Count,
ID_CanMsg18ECFF0B_Msg_Count,
ID_CanMsg18EBFF0B_Msg_Count,
ID_CanMsg18ECFF10_Msg_Count,
ID_CanMsg18EBFF10_Msg_Count,
ID_CanMsg18ECFFA0_Msg_Count,
ID_CanMsg18EBFFA0_Msg_Count,
ID_CanMsg18ECFFE8_Msg_Count,
ID_CanMsg18EBFFE8_Msg_Count,
ID_TOTAL_MAX,
} CAN_MSG_ID_t;
......@@ -123,6 +137,20 @@ extern const st_CAN_SendAttribute st_CANSendAttr[ID_SEND_TOTAL] ;
#define ID_CanMsg18FECAA1_Msg 0x18FECAA1u
#define ID_CanMsg18FECAA0_Msg 0x18FECAA0u
#define ID_CanMsg18FECA00_Msg 0x18FECA00u
#define ID_CanMsg18FECA10_Msg 0x18FECA10u
#define ID_CanMsg18ECFF00_Msg 0x18ECFF00u
#define ID_CanMsg18EBFF00_Msg 0x18EBFF00u
#define ID_CanMsg18ECFF0B_Msg 0x18ECFF0Bu
#define ID_CanMsg18EBFF0B_Msg 0x18EBFF0Bu
#define ID_CanMsg18ECFF10_Msg 0x18ECFF10u
#define ID_CanMsg18EBFF10_Msg 0x18EBFF10u
#define ID_CanMsg18ECFFA0_Msg 0x18ECFFA0u
#define ID_CanMsg18EBFFA0_Msg 0x18EBFFA0u
#define ID_CanMsg18ECFFE8_Msg 0x18ECFFE8u
#define ID_CanMsg18EBFFE8_Msg 0x18EBFFE8u
extern uint8_t Get_ID_18FF5510_Sig_Intarder_Pilot_Lamp_State(void);
extern uint8_t Get_ID_18FF2300_Sig_EXH_System(void);
extern uint8_t Get_ID_18FF2300_Sig_Engine_Derate(void);
......@@ -234,6 +262,60 @@ extern uint8_t Get_ID_18FECA2A_Sig_AebsOff(void);
extern uint8_t Get_ID_18FECAA1_Sig_AebsOff(void);
extern uint8_t Get_ID_18FECAA0_Sig_AebsOff(void);
extern uint16_t Get_ID_18FECA00_Sig_DM1(void);
extern uint8_t Get_ID_18ECFF00_Sig_PRIO(void);
extern uint8_t Get_ID_18ECFF00_Sig_DATA_NUM(void);
extern uint8_t Get_ID_18ECFF00_Sig_FRAME_NUM(void);
extern uint8_t Get_ID_18ECFF00_Sig_PS(void);
extern uint16_t Get_ID_18ECFF00_Sig_PGN(void);
extern uint8_t Get_ID_18ECFF00_Sig_SA(void);
extern uint8_t Get_ID_18EBFF00_Sig_DATA(uint8_t Data_Buff);
extern uint16_t Get_ID_18FECA03_Sig_DM1(void);
extern uint8_t Get_ID_18ECFF03_Sig_PRIO(void);
extern uint8_t Get_ID_18ECFF03_Sig_DATA_NUM(void);
extern uint8_t Get_ID_18ECFF03_Sig_FRAME_NUM(void);
extern uint8_t Get_ID_18ECFF03_Sig_PS(void);
extern uint16_t Get_ID_18ECFF03_Sig_PGN(void);
extern uint8_t Get_ID_18ECFF03_Sig_SA(void);
extern uint8_t Get_ID_18EBFF03_Sig_DATA(uint8_t Data_Buff);
extern uint16_t Get_ID_18FECA0B_Sig_DM1(void);
extern uint8_t Get_ID_18ECFF0B_Sig_PRIO(void);
extern uint8_t Get_ID_18ECFF0B_Sig_DATA_NUM(void);
extern uint8_t Get_ID_18ECFF0B_Sig_FRAME_NUM(void);
extern uint8_t Get_ID_18ECFF0B_Sig_PS(void);
extern uint16_t Get_ID_18ECFF0B_Sig_PGN(void);
extern uint8_t Get_ID_18ECFF0B_Sig_SA(void);
extern uint8_t Get_ID_18EBFF0B_Sig_DATA(uint8_t Data_Buff);
extern uint16_t Get_ID_18FECA10_Sig_DM1(void);
extern uint8_t Get_ID_18ECFF10_Sig_PRIO(void);
extern uint8_t Get_ID_18ECFF10_Sig_DATA_NUM(void);
extern uint8_t Get_ID_18ECFF10_Sig_FRAME_NUM(void);
extern uint8_t Get_ID_18ECFF10_Sig_PS(void);
extern uint16_t Get_ID_18ECFF10_Sig_PGN(void);
extern uint8_t Get_ID_18ECFF10_Sig_SA(void);
extern uint8_t Get_ID_18EBFF10_Sig_DATA(uint8_t Data_Buff);
extern uint16_t Get_ID_18FECAA0_Sig_DM1(void);
extern uint8_t Get_ID_18ECFFA0_Sig_PRIO(void);
extern uint8_t Get_ID_18ECFFA0_Sig_DATA_NUM(void);
extern uint8_t Get_ID_18ECFFA0_Sig_FRAME_NUM(void);
extern uint8_t Get_ID_18ECFFA0_Sig_PS(void);
extern uint16_t Get_ID_18ECFFA0_Sig_PGN(void);
extern uint8_t Get_ID_18ECFFA0_Sig_SA(void);
extern uint8_t Get_ID_18EBFFA0_Sig_DATA(uint8_t Data_Buff);
extern uint16_t Get_ID_18FECAE8_Sig_DM1(void);
extern uint8_t Get_ID_18ECFFE8_Sig_PRIO(void);
extern uint8_t Get_ID_18ECFFE8_Sig_DATA_NUM(void);
extern uint8_t Get_ID_18ECFFE8_Sig_FRAME_NUM(void);
extern uint8_t Get_ID_18ECFFE8_Sig_PS(void);
extern uint16_t Get_ID_18ECFFE8_Sig_PGN(void);
extern uint8_t Get_ID_18ECFFE8_Sig_SA(void);
extern uint8_t Get_ID_18EBFFE8_Sig_DATA(uint8_t Data_Buff);
extern uint8_t Co_Can_ConvertSubID(uint32_t MsgID);
#endif
......@@ -23,6 +23,35 @@ extern USER_ECU User_ECU;
extern uint32_t DisDTCNumber[50];
extern uint32_t DisDTCNum;
#define MAX_MULCANDATALEN 100
typedef union
{
struct
{
uint32_t StructDTC[25];
} SubDTC;
uint8_t UnionDTC[100];
} _DATADTC;
typedef struct //7 bytes
{
uint16_t wPGN; //打包消息的参数组编号
uint8_t bPackage; //全部数据包的数
uint8_t bLength; //整个消息大小的字节数
uint8_t bCtrByte; //控制字节
uint8_t bRcvInfoFlg; //有效接收标志,接收到该报文=1
uint8_t bRcvBusy; // 本标志位有效,表明正在接收多包信息。
uint8_t bPrePckNum; //上一个包序号
_DATADTC DataDTC; //多包信息缓冲区
} MULCANMSG;
extern MULCANMSG ECM18EBFF00;
extern MULCANMSG ECM18EBFF03;
extern MULCANMSG ECM18EBFF0B;
extern MULCANMSG ECM18EBFF10;
extern MULCANMSG ECM18EBFFA0;
extern MULCANMSG ECM18EBFFE8;
extern void Can_Set_Buff_18FEAE17(uint8_t CopyData[]);
extern void Can_Set_Buff_18FF3E17(uint8_t CopyData[]);
......@@ -79,5 +108,11 @@ void Common_DTC_Server(void);
void GetAllDtcFault(uint32_t* pCurFault, uint8_t* pCurFaultNum, uint32_t* pHisFault, uint8_t* pHisFaultNum);
void swap32(uint32_t *DwData);
void DoCAN_Get_Multi_frame00_Recv(void);
void DoCAN_Get_Multi_frame03_Recv(void);
void DoCAN_Get_Multi_frame0B_Recv(void);
void DoCAN_Get_Multi_frame10_Recv(void);
void DoCAN_Get_Multi_frameA0_Recv(void);
void DoCAN_Get_Multi_frameE8_Recv(void);
#endif
\ No newline at end of file
......@@ -16,8 +16,8 @@
#define FState_COilTimeOutNum 60u /*3S*/
#define SystemSupplierECUHardwareVersionNumberApp ((uint16_t)(10201)) /*硬件版本号 HV:01.02.00*/
#define SystemSupplierECUSoftwareInformationApp ((uint16_t)(10102)) /*软件版本号 SV:01.01.02*/
#define systemSupplierECUFlashInformationApp ((uint16_t)(12)) /*FLASH版本号 FV:00.12*/
#define SystemSupplierECUSoftwareInformationApp ((uint16_t)(10103)) /*软件版本号 SV:01.01.03*/
#define systemSupplierECUFlashInformationApp ((uint16_t)(13)) /*FLASH版本号 FV:00.13*/
typedef struct
{
......
......@@ -32,8 +32,8 @@ const RSCANFD_Filter_st_t CANFD_RX_RULE_TABLE_LIST[CANFD0_RX_RULE_SIZE] =
{0x98011733ul, 0xDFFFFFFFUL, 0x80000000ul, CANFD0_CH0_RX_SELECT},/*15*/
{0x98021733ul, 0xDFFFFFFFUL, 0x80000000ul, CANFD0_CH0_RX_SELECT},/*16*/
{0x98EA0021ul, 0xDFFFFFFFUL, 0x80000000ul, CANFD0_CH0_RX_SELECT},/*17*/
{0x98EBFF03ul, 0xDFFFFFFFUL, 0x80000000ul, CANFD0_CH0_RX_SELECT},/*18*/
{0x98ECFF03ul, 0xDFFFFFFFUL, 0x80000000ul, CANFD0_CH0_RX_SELECT},/*19*/
{0x98EBFF00ul, 0xDFFFFF00UL, 0x80000000ul, CANFD0_CH0_RX_SELECT},/*18*/
{0x98ECFF00ul, 0xDFFFFF00UL, 0x80000000ul, CANFD0_CH0_RX_SELECT},/*19*/
{0x98EF1718ul, 0xDFFFFFFFUL, 0x80000000ul, CANFD0_CH0_RX_SELECT},/*20*/
{0x98F00000ul, 0xDFF00000UL, 0x80000000ul, CANFD0_CH0_RX_SELECT},/*21*/
{0x9CFFFEF2ul, 0xDFFFFFFFUL, 0x80000000ul, CANFD0_CH0_RX_SELECT},/*22*/
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -346,6 +346,7 @@ enum SpriteName
CN_Alarm_01_1,
CN_Alarm_02,
CN_Alarm_02_1,
CN_Alarm_03,
CN_ODO,
CN_ODO_danwei,
CN_TRIP,
......@@ -645,6 +646,30 @@ enum SpriteName
CN_Road3_yinying_3,
CN_tanhao1,
CN_tanhao2,
CN_Alarm_72_image,
CN_Alarm_72_wenzi,
CN_Alarm_73_image,
CN_Alarm_73_wenzi,
CN_Alarm_74_image,
CN_Alarm_74_wenzi,
CN_Alarm_75_image,
CN_Alarm_75_wenzi,
CN_Alarm_76_image,
CN_Alarm_76_wenzi1,
CN_Alarm_76_wenzi2,
CN_Alarm_Fault_04_image,
CN_Alarm_Fault_04_wenzi,
CN_Alarm_Fault_05_wenzi,
CN_Alarm_Fault_06_image,
CN_Alarm_Fault_06_wenzi,
CN_Alarm_Fault_07_image,
CN_Alarm_Fault_07_wenzi,
CN_Alarm_Fault_08_image,
CN_Alarm_Fault_08_wenzi,
CN_Alarm_Fault_09_image,
CN_Alarm_Fault_09_wenzi,
CN_Alarm_Fault_10_image,
CN_Alarm_Fault_10_wenzi,
CN_fengexian,
CN_gundongtiao,
CN_Fty_Menu1_01black,
......
......@@ -255,6 +255,13 @@ void Sys_Run_Mode_100ms_Tasks(void)
Common_Set_K_Line_Value();
Common_DTC_Server();
DoCAN_Get_Multi_frame00_Recv();
DoCAN_Get_Multi_frame03_Recv();
DoCAN_Get_Multi_frame0B_Recv();
DoCAN_Get_Multi_frame10_Recv();
DoCAN_Get_Multi_frameA0_Recv();
DoCAN_Get_Multi_frameE8_Recv();
Drive_Info_Speed1_Plus_Conversion();
Drive_Info_Speed2_Plus_Conversion();
......
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