Commit f95667f3 authored by hu's avatar hu

增加故障码分发BUG

parent 670081b4
......@@ -51,6 +51,13 @@ _TPMS TPMS_Matching;
_UserSet User_set_Num;
_UserSet User_App;
uint32_t DTCNumberEngine[DTCNumberBuf];
uint32_t DTCNumberBrake[DTCNumberBuf];
uint32_t DTCNumberAMT[DTCNumberBuf];
uint32_t DTCNumberRadar[DTCNumberBuf];
uint32_t DTCNumberCamera[DTCNumberBuf];
uint32_t DTCNumberRetarder[DTCNumberBuf];
/*-------------------------------------------------------------------------
* Function Name : GUI_Display_KL15_ON_Init
* Description :
......@@ -121,6 +128,8 @@ void GUI_Display_Animation_Frame(uint16_t frame)
}
void GUI_Display_Value_Init(void)
{
uint8_t i = 0u;
/*菜单状态初始化*/
State_Flag.FState_GZM = 1u ;
State_Flag.FState_WXTZ = 2u ;
......@@ -290,6 +299,16 @@ void GUI_Display_Value_Init(void)
DTCNumTime = 0u; /*故障码显示时间*/
GUIDTCNumDis = 0u; /*当前显示的故障码*/
for (i = 0 ; i < DTCNumberBuf; i++)
{
DTCNumberEngine[i] = 0u;
DTCNumberBrake[i] = 0u;
DTCNumberAMT[i] = 0u;
DTCNumberRadar[i] = 0u;
DTCNumberCamera[i] = 0u;
DTCNumberRetarder[i] = 0u;
}
Display_DTC[0u].Disp_Mod_Menu_Cbk = GUI_BG_DTCEngine_Display; /*发动机故障*/
Display_DTC[1u].Disp_Mod_Menu_Cbk = GUI_BG_DTCBrake_Display; /*刹车故障*/
Display_DTC[2u].Disp_Mod_Menu_Cbk = GUI_BG_DTCAMT_Display; /*变速箱故障*/
......@@ -7511,8 +7530,19 @@ void GUI_BG_DTCEngine_Display(uint8_t Mode)
uint8_t DTCNumCode = 0u;
uint32_t DTNumValue = 0u;
//uint32_t DTNum = 0u;
uint8_t i = 0u;
uint32_t UdsCanID;
DTNum = DisDTCNumber[DTCDispNum];
UdsCanID = Common_Get_UdsCanIDSta();
if (UdsCanID == 0x7E8u)
{
for (i = 0u; i < DisDTCNum; i++)
{
DTCNumberEngine[i] = DisDTCNumber[i];
}
}
DTNum = DTCNumberEngine[DTCDispNum];
if (DTCNumTime < 50)
{
......@@ -7719,9 +7749,20 @@ void GUI_BG_DTCBrake_Display(uint8_t Mode)
uint8_t DTCNumCode = 0u;
uint32_t DTNumValue = 0u;
uint32_t Data_Value = 0u;
uint8_t i = 0u;
uint32_t UdsCanID;
UdsCanID = Common_Get_UdsCanIDSta();
if (UdsCanID == 0x18DAF00Bu)
{
for (i = 0u; i < DisDTCNum; i++)
{
DTCNumberBrake[i] = DisDTCNumber[i];
}
}
//DTNum = DisDTCNumber[DTCDispNum];
Data_Value = DisDTCNumber[DTCDispNum];
Data_Value = DTCNumberBrake[DTCDispNum];
swap32(&Data_Value);
Data_Value = (uint32_t)(Data_Value & 0xFFFFu);
......@@ -7845,9 +7886,20 @@ void GUI_BG_DTCAMT_Display(uint8_t Mode)
uint8_t DTCNumCode = 0u;
uint32_t DTNumValue = 0u;
uint32_t Data_Value = 0u;
uint8_t i = 0u;
uint32_t UdsCanID;
UdsCanID = Common_Get_UdsCanIDSta();
if (UdsCanID == 0x18DAF003)
{
for (i = 0u; i < DisDTCNum; i++)
{
DTCNumberAMT[i] = DisDTCNumber[i];
}
}
//DTNum = DisDTCNumber[DTCDispNum];
Data_Value = DisDTCNumber[DTCDispNum];
Data_Value = DTCNumberAMT[DTCDispNum];
swap32(&Data_Value);
Data_Value = (uint32_t)(Data_Value & 0xFFFFu);
......@@ -7971,9 +8023,20 @@ void GUI_BG_DTCRadar_Display(uint8_t Mode)
uint8_t DTCNumCode = 0u;
uint32_t DTNumValue = 0u;
uint32_t Data_Value = 0u;
uint8_t i = 0u;
uint32_t UdsCanID;
UdsCanID = Common_Get_UdsCanIDSta();
if (UdsCanID == 0x18DAF0A0u)
{
for (i = 0u; i < DisDTCNum; i++)
{
DTCNumberRadar[i] = DisDTCNumber[i];
}
}
//DTNum = DisDTCNumber[DTCDispNum];
Data_Value = DisDTCNumber[DTCDispNum];
Data_Value = DTCNumberRadar[DTCDispNum];
swap32(&Data_Value);
Data_Value = (uint32_t)(Data_Value & 0xFFFFu);
......@@ -8098,9 +8161,20 @@ void GUI_BG_DTCCamera_Display(uint8_t Mode)
uint8_t DTCNumCode = 0u;
uint32_t DTNumValue = 0u;
uint32_t Data_Value = 0u;
uint8_t i = 0u;
uint32_t UdsCanID;
UdsCanID = Common_Get_UdsCanIDSta();
if (UdsCanID == 0x18DAF0E8u)
{
for (i = 0u; i < DisDTCNum; i++)
{
DTCNumberCamera[i] = DisDTCNumber[i];
}
}
//DTNum = DisDTCNumber[DTCDispNum];
Data_Value = DisDTCNumber[DTCDispNum];
Data_Value = DTCNumberCamera[DTCDispNum];
swap32(&Data_Value);
Data_Value = (uint32_t)(Data_Value & 0xFFFFu);
......@@ -8224,9 +8298,20 @@ void GUI_BG_DTCRetarder_Display(uint8_t Mode)
uint8_t DTCNumCode = 0u;
uint32_t DTNumValue = 0u;
uint32_t Data_Value = 0u;
uint8_t i = 0u;
uint32_t UdsCanID;
UdsCanID = Common_Get_UdsCanIDSta();
if (UdsCanID == 0x18DAF010u)
{
for (i = 0u; i < DisDTCNum; i++)
{
DTCNumberRetarder[i] = DisDTCNumber[i];
}
}
//DTNum = DisDTCNumber[DTCDispNum];
Data_Value = DisDTCNumber[DTCDispNum];
Data_Value = DTCNumberRetarder[DTCDispNum];
swap32(&Data_Value);
Data_Value = (uint32_t)(Data_Value & 0xFFFFu);
......
......@@ -12,7 +12,8 @@
#define Language_En 0u
#define Language_Cn 1u
#define DTCNumeber 6u /*最小数值为1*/
#define DTCNumeber 6u /*最小数值为1*/
#define DTCNumberBuf 50u
#define FState_COilTimeOutNum 60u /*3S*/
......
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