Commit f53ee7a3 authored by hu's avatar hu

调整报文外发,增加故障码独立个数计数

parent f95667f3
......@@ -193,29 +193,31 @@ void Can_Set_Buff_18FED917(uint8_t CopyData[])
Blanding_SW_Signal = Line_In_Get_Status(LINE_IN_RET_BLENDING); /*A10*/
Tralier_ABS_Fully_Operational = Line_In_Get_Status(LINE_IN_TRAILER_ABS); /*B33*/
if (Line_In_Get_Status(LINE_IN_TRAILER_CONNECT) == 1u) /*B06*/
{
if ((Line_In_Get_Status(LINE_IN_TRAILER_ABS_INFO) == 1u) &&/*B03*/
(Line_In_Get_Status(LINE_IN_ABS_DETECT) == 1u)) /*A33*/
if (Line_In_Get_Status(LINE_IN_TRAILER_ABS) == 1u) /*B33*/
{
Tlailer_ABS_Detect = 0u;
Tralier_ABS_Fully_Operational = 0x00u;
}
}
else
{
if ((Line_In_Get_Status(LINE_IN_TRAILER_ABS_INFO) == 1u) && /*B03*/
(Line_In_Get_Status(LINE_IN_ABS_DETECT) == 1u)) /*A33*/
else
{
Tralier_ABS_Fully_Operational = 0x01u;
}
if (Line_In_Get_Status(LINE_IN_ABS_DETECT) == 1u) /*A33*/
{
Tlailer_ABS_Detect = 1u;
Tlailer_ABS_Detect = 0x00u;
}
else if ((Line_In_Get_Status(LINE_IN_TRAILER_ABS_INFO) == 0u) && /*B03*/
(Line_In_Get_Status(LINE_IN_ABS_DETECT) == 0u)) /*A33*/
else
{
Tlailer_ABS_Detect = 0u;
Tlailer_ABS_Detect = 0x01u;
}
}
else
{
Tlailer_ABS_Detect = 0x03u;
Tralier_ABS_Fully_Operational = 0x03u;
}
Tlailer_Connected = Line_In_Get_Status(LINE_IN_TRAILER_CONNECT); /*B6*/
......
......@@ -58,6 +58,13 @@ uint32_t DTCNumberRadar[DTCNumberBuf];
uint32_t DTCNumberCamera[DTCNumberBuf];
uint32_t DTCNumberRetarder[DTCNumberBuf];
uint32_t DisDTCNumEngine ;
uint32_t DisDTCNumBrake ;
uint32_t DisDTCNumAMT ;
uint32_t DisDTCNumRadar ;
uint32_t DisDTCNumCamera ;
uint32_t DisDTCNumRetarder ;
/*-------------------------------------------------------------------------
* Function Name : GUI_Display_KL15_ON_Init
* Description :
......@@ -309,6 +316,15 @@ void GUI_Display_Value_Init(void)
DTCNumberRetarder[i] = 0u;
}
DisDTCNumEngine = 0u;
DisDTCNumBrake = 0u;
DisDTCNumAMT = 0u;
DisDTCNumRadar = 0u;
DisDTCNumCamera = 0u;
DisDTCNumRetarder = 0u;
DPD_Display_Time = 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; /*变速箱故障*/
......@@ -316,8 +332,6 @@ void GUI_Display_Value_Init(void)
Display_DTC[4u].Disp_Mod_Menu_Cbk = GUI_BG_DTCCamera_Display; /*摄像头故障码*/
Display_DTC[5u].Disp_Mod_Menu_Cbk = GUI_BG_DTCRetarder_Display; /*液力缓速器故障码*/
Display_DTC[6u].Disp_Mod_Menu_Cbk = GUI_Display_NULL; /*无故障*/
DPD_Display_Time = 0u;
}
/*-------------------------------------------------------------------------
......@@ -7536,7 +7550,9 @@ void GUI_BG_DTCEngine_Display(uint8_t Mode)
UdsCanID = Common_Get_UdsCanIDSta();
if (UdsCanID == 0x7E8u)
{
for (i = 0u; i < DisDTCNum; i++)
DisDTCNumEngine = DisDTCNum;
for (i = 0u; i < DisDTCNumEngine; i++)
{
DTCNumberEngine[i] = DisDTCNumber[i];
}
......@@ -7554,7 +7570,7 @@ void GUI_BG_DTCEngine_Display(uint8_t Mode)
DTCDispNum++;
if (DTCDispNum >= DisDTCNum)
if (DTCDispNum >= DisDTCNumEngine)
{
DTCDispNum = 0u;
}
......@@ -7755,7 +7771,9 @@ void GUI_BG_DTCBrake_Display(uint8_t Mode)
UdsCanID = Common_Get_UdsCanIDSta();
if (UdsCanID == 0x18DAF00Bu)
{
for (i = 0u; i < DisDTCNum; i++)
DisDTCNumBrake = DisDTCNum;
for (i = 0u; i < DisDTCNumBrake; i++)
{
DTCNumberBrake[i] = DisDTCNumber[i];
}
......@@ -7776,7 +7794,7 @@ void GUI_BG_DTCBrake_Display(uint8_t Mode)
DTCDispNum++;
if (DTCDispNum >= DisDTCNum)
if (DTCDispNum >= DisDTCNumBrake)
{
DTCDispNum = 0u;
}
......@@ -7892,7 +7910,9 @@ void GUI_BG_DTCAMT_Display(uint8_t Mode)
UdsCanID = Common_Get_UdsCanIDSta();
if (UdsCanID == 0x18DAF003)
{
for (i = 0u; i < DisDTCNum; i++)
DisDTCNumAMT = DisDTCNum;
for (i = 0u; i < DisDTCNumAMT; i++)
{
DTCNumberAMT[i] = DisDTCNumber[i];
}
......@@ -7913,7 +7933,7 @@ void GUI_BG_DTCAMT_Display(uint8_t Mode)
DTCDispNum++;
if (DTCDispNum >= DisDTCNum)
if (DTCDispNum >= DisDTCNumAMT)
{
DTCDispNum = 0u;
}
......@@ -8029,7 +8049,9 @@ void GUI_BG_DTCRadar_Display(uint8_t Mode)
UdsCanID = Common_Get_UdsCanIDSta();
if (UdsCanID == 0x18DAF0A0u)
{
for (i = 0u; i < DisDTCNum; i++)
DisDTCNumRadar = DisDTCNum;
for (i = 0u; i < DisDTCNumRadar; i++)
{
DTCNumberRadar[i] = DisDTCNumber[i];
}
......@@ -8050,7 +8072,7 @@ void GUI_BG_DTCRadar_Display(uint8_t Mode)
DTCDispNum++;
if (DTCDispNum >= DisDTCNum)
if (DTCDispNum >= DisDTCNumRadar)
{
DTCDispNum = 0u;
}
......@@ -8167,7 +8189,9 @@ void GUI_BG_DTCCamera_Display(uint8_t Mode)
UdsCanID = Common_Get_UdsCanIDSta();
if (UdsCanID == 0x18DAF0E8u)
{
for (i = 0u; i < DisDTCNum; i++)
DisDTCNumCamera = DisDTCNum;
for (i = 0u; i < DisDTCNumCamera; i++)
{
DTCNumberCamera[i] = DisDTCNumber[i];
}
......@@ -8188,7 +8212,7 @@ void GUI_BG_DTCCamera_Display(uint8_t Mode)
DTCDispNum++;
if (DTCDispNum >= DisDTCNum)
if (DTCDispNum >= DisDTCNumCamera)
{
DTCDispNum = 0u;
}
......@@ -8304,7 +8328,9 @@ void GUI_BG_DTCRetarder_Display(uint8_t Mode)
UdsCanID = Common_Get_UdsCanIDSta();
if (UdsCanID == 0x18DAF010u)
{
for (i = 0u; i < DisDTCNum; i++)
DisDTCNumRetarder = DisDTCNum;
for (i = 0u; i < DisDTCNumRetarder; i++)
{
DTCNumberRetarder[i] = DisDTCNumber[i];
}
......@@ -8325,7 +8351,7 @@ void GUI_BG_DTCRetarder_Display(uint8_t Mode)
DTCDispNum++;
if (DTCDispNum >= DisDTCNum)
if (DTCDispNum >= DisDTCNumRetarder)
{
DTCDispNum = 0u;
}
......
......@@ -15,6 +15,20 @@
#define DTCNumeber 6u /*最小数值为1*/
#define DTCNumberBuf 50u
extern uint32_t DTCNumberEngine[DTCNumberBuf];
extern uint32_t DTCNumberBrake[DTCNumberBuf];
extern uint32_t DTCNumberAMT[DTCNumberBuf];
extern uint32_t DTCNumberRadar[DTCNumberBuf];
extern uint32_t DTCNumberCamera[DTCNumberBuf];
extern uint32_t DTCNumberRetarder[DTCNumberBuf];
extern uint32_t DisDTCNumEngine ;
extern uint32_t DisDTCNumBrake ;
extern uint32_t DisDTCNumAMT ;
extern uint32_t DisDTCNumRadar ;
extern uint32_t DisDTCNumCamera ;
extern uint32_t DisDTCNumRetarder ;
#define FState_COilTimeOutNum 60u /*3S*/
#define SystemSupplierECUHardwareVersionNumberApp ((uint16_t)(10201)) /*硬件版本号 HV:01.02.00*/
......
......@@ -2429,6 +2429,23 @@ void LevelF1_6Menu_2Exit(void)
/*----工厂模式---- 116发动机----*/
void LevelF2_1Menu_1Enter(void)
{
uint8_t i = 0u;
for (i = 0u; i < 50; i++)
{
DTCNumberEngine[i] = 0x00u;
DTCNumberBrake[i] = 0x00u;
DTCNumberAMT[i] = 0x00u;
DTCNumberRadar[i] = 0x00u;
DTCNumberCamera[i] = 0x00u;
DTCNumberRetarder[i] = 0x00u;
}
DisDTCNumEngine = 0u ;
DisDTCNumBrake = 0u ;
DisDTCNumAMT = 0u ;
DisDTCNumRadar = 0u ;
DisDTCNumCamera = 0u ;
DisDTCNumRetarder = 0u ;
//03 19 02 0C 55 55 55 55
_CAN_Msg canMag;
......@@ -2487,6 +2504,22 @@ void LevelF2_1Menu_1Exit(void)
/*----工厂模式----117 刹车----*/
void LevelF2_1Menu_2Enter(void)
{
uint8_t i = 0u;
for (i = 0u; i < 50; i++)
{
DTCNumberEngine[i] = 0x00u;
DTCNumberBrake[i] = 0x00u;
DTCNumberAMT[i] = 0x00u;
DTCNumberRadar[i] = 0x00u;
DTCNumberCamera[i] = 0x00u;
DTCNumberRetarder[i] = 0x00u;
}
DisDTCNumEngine = 0u ;
DisDTCNumBrake = 0u ;
DisDTCNumAMT = 0u ;
DisDTCNumRadar = 0u ;
DisDTCNumCamera = 0u ;
DisDTCNumRetarder = 0u ;
//03 19 02 0C 55 55 55 55
_CAN_Msg canMag;
......@@ -2544,6 +2577,22 @@ void LevelF2_1Menu_2Exit(void)
/*----工厂模式----118 变速箱----*/
void LevelF2_1Menu_3Enter(void)
{
uint8_t i = 0u;
for (i = 0u; i < 50; i++)
{
DTCNumberEngine[i] = 0x00u;
DTCNumberBrake[i] = 0x00u;
DTCNumberAMT[i] = 0x00u;
DTCNumberRadar[i] = 0x00u;
DTCNumberCamera[i] = 0x00u;
DTCNumberRetarder[i] = 0x00u;
}
DisDTCNumEngine = 0u ;
DisDTCNumBrake = 0u ;
DisDTCNumAMT = 0u ;
DisDTCNumRadar = 0u ;
DisDTCNumCamera = 0u ;
DisDTCNumRetarder = 0u ;
//03 19 02 0C 55 55 55 55
_CAN_Msg canMag;
......@@ -2601,6 +2650,22 @@ void LevelF2_1Menu_3Exit(void)
/*----工厂模式----119 雷达----*/
void LevelF2_1Menu_4Enter(void)
{
uint8_t i = 0u;
for (i = 0u; i < 50; i++)
{
DTCNumberEngine[i] = 0x00u;
DTCNumberBrake[i] = 0x00u;
DTCNumberAMT[i] = 0x00u;
DTCNumberRadar[i] = 0x00u;
DTCNumberCamera[i] = 0x00u;
DTCNumberRetarder[i] = 0x00u;
}
DisDTCNumEngine = 0u ;
DisDTCNumBrake = 0u ;
DisDTCNumAMT = 0u ;
DisDTCNumRadar = 0u ;
DisDTCNumCamera = 0u ;
DisDTCNumRetarder = 0u ;
//03 19 02 0C 55 55 55 55
_CAN_Msg canMag;
......@@ -2658,6 +2723,22 @@ void LevelF2_1Menu_4Exit(void)
/*----工厂模式----120 摄像头----*/
void LevelF2_1Menu_5Enter(void)
{
uint8_t i = 0u;
for (i = 0u; i < 50; i++)
{
DTCNumberEngine[i] = 0x00u;
DTCNumberBrake[i] = 0x00u;
DTCNumberAMT[i] = 0x00u;
DTCNumberRadar[i] = 0x00u;
DTCNumberCamera[i] = 0x00u;
DTCNumberRetarder[i] = 0x00u;
}
DisDTCNumEngine = 0u ;
DisDTCNumBrake = 0u ;
DisDTCNumAMT = 0u ;
DisDTCNumRadar = 0u ;
DisDTCNumCamera = 0u ;
DisDTCNumRetarder = 0u ;
//03 19 02 0C 55 55 55 55
_CAN_Msg canMag;
......@@ -2715,6 +2796,22 @@ void LevelF2_1Menu_5Exit(void)
/*----工厂模式----121 液缓----*/
void LevelF2_1Menu_6Enter(void)
{
uint8_t i = 0u;
for (i = 0u; i < 50; i++)
{
DTCNumberEngine[i] = 0x00u;
DTCNumberBrake[i] = 0x00u;
DTCNumberAMT[i] = 0x00u;
DTCNumberRadar[i] = 0x00u;
DTCNumberCamera[i] = 0x00u;
DTCNumberRetarder[i] = 0x00u;
}
DisDTCNumEngine = 0u ;
DisDTCNumBrake = 0u ;
DisDTCNumAMT = 0u ;
DisDTCNumRadar = 0u ;
DisDTCNumCamera = 0u ;
DisDTCNumRetarder = 0u ;
//03 19 02 0C 55 55 55 55
_CAN_Msg canMag;
......@@ -3446,6 +3543,22 @@ void LevelD2_5Menu_1Exit(void)
/*----经销商模式----发动机----*/
void LevelD2_1Menu_1Enter(void)
{
uint8_t i = 0u;
for (i = 0u; i < 50; i++)
{
DTCNumberEngine[i] = 0x00u;
DTCNumberBrake[i] = 0x00u;
DTCNumberAMT[i] = 0x00u;
DTCNumberRadar[i] = 0x00u;
DTCNumberCamera[i] = 0x00u;
DTCNumberRetarder[i] = 0x00u;
}
DisDTCNumEngine = 0u ;
DisDTCNumBrake = 0u ;
DisDTCNumAMT = 0u ;
DisDTCNumRadar = 0u ;
DisDTCNumCamera = 0u ;
DisDTCNumRetarder = 0u ;
//03 19 02 0C 55 55 55 55
_CAN_Msg canMag;
......@@ -3504,6 +3617,22 @@ void LevelD2_1Menu_1Exit(void)
/*----经销商模式----刹车----*/
void LevelD2_1Menu_2Enter(void)
{
uint8_t i = 0u;
for (i = 0u; i < 50; i++)
{
DTCNumberEngine[i] = 0x00u;
DTCNumberBrake[i] = 0x00u;
DTCNumberAMT[i] = 0x00u;
DTCNumberRadar[i] = 0x00u;
DTCNumberCamera[i] = 0x00u;
DTCNumberRetarder[i] = 0x00u;
}
DisDTCNumEngine = 0u ;
DisDTCNumBrake = 0u ;
DisDTCNumAMT = 0u ;
DisDTCNumRadar = 0u ;
DisDTCNumCamera = 0u ;
DisDTCNumRetarder = 0u ;
//03 19 02 0C 55 55 55 55
_CAN_Msg canMag;
......@@ -3561,6 +3690,22 @@ void LevelD2_1Menu_2Exit(void)
/*----经销商模式----变速箱----*/
void LevelD2_1Menu_3Enter(void)
{
uint8_t i = 0u;
for (i = 0u; i < 50; i++)
{
DTCNumberEngine[i] = 0x00u;
DTCNumberBrake[i] = 0x00u;
DTCNumberAMT[i] = 0x00u;
DTCNumberRadar[i] = 0x00u;
DTCNumberCamera[i] = 0x00u;
DTCNumberRetarder[i] = 0x00u;
}
DisDTCNumEngine = 0u ;
DisDTCNumBrake = 0u ;
DisDTCNumAMT = 0u ;
DisDTCNumRadar = 0u ;
DisDTCNumCamera = 0u ;
DisDTCNumRetarder = 0u ;
//03 19 02 0C 55 55 55 55
_CAN_Msg canMag;
......@@ -3618,6 +3763,22 @@ void LevelD2_1Menu_3Exit(void)
/*----经销商模式----雷达----*/
void LevelD2_1Menu_4Enter(void)
{
uint8_t i = 0u;
for (i = 0u; i < 50; i++)
{
DTCNumberEngine[i] = 0x00u;
DTCNumberBrake[i] = 0x00u;
DTCNumberAMT[i] = 0x00u;
DTCNumberRadar[i] = 0x00u;
DTCNumberCamera[i] = 0x00u;
DTCNumberRetarder[i] = 0x00u;
}
DisDTCNumEngine = 0u ;
DisDTCNumBrake = 0u ;
DisDTCNumAMT = 0u ;
DisDTCNumRadar = 0u ;
DisDTCNumCamera = 0u ;
DisDTCNumRetarder = 0u ;
//03 19 02 0C 55 55 55 55
_CAN_Msg canMag;
......@@ -3675,6 +3836,22 @@ void LevelD2_1Menu_4Exit(void)
/*----经销商模式----摄像头----*/
void LevelD2_1Menu_5Enter(void)
{
uint8_t i = 0u;
for (i = 0u; i < 50; i++)
{
DTCNumberEngine[i] = 0x00u;
DTCNumberBrake[i] = 0x00u;
DTCNumberAMT[i] = 0x00u;
DTCNumberRadar[i] = 0x00u;
DTCNumberCamera[i] = 0x00u;
DTCNumberRetarder[i] = 0x00u;
}
DisDTCNumEngine = 0u ;
DisDTCNumBrake = 0u ;
DisDTCNumAMT = 0u ;
DisDTCNumRadar = 0u ;
DisDTCNumCamera = 0u ;
DisDTCNumRetarder = 0u ;
//03 19 02 0C 55 55 55 55
_CAN_Msg canMag;
......@@ -3732,6 +3909,22 @@ void LevelD2_1Menu_5Exit(void)
/*----经销商模式----液缓----*/
void LevelD2_1Menu_6Enter(void)
{
uint8_t i = 0u;
for (i = 0u; i < 50; i++)
{
DTCNumberEngine[i] = 0x00u;
DTCNumberBrake[i] = 0x00u;
DTCNumberAMT[i] = 0x00u;
DTCNumberRadar[i] = 0x00u;
DTCNumberCamera[i] = 0x00u;
DTCNumberRetarder[i] = 0x00u;
}
DisDTCNumEngine = 0u ;
DisDTCNumBrake = 0u ;
DisDTCNumAMT = 0u ;
DisDTCNumRadar = 0u ;
DisDTCNumCamera = 0u ;
DisDTCNumRetarder = 0u ;
//03 19 02 0C 55 55 55 55
_CAN_Msg canMag;
......
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