Commit 92084f75 authored by hu's avatar hu

调整刹车DTC请求

parent ade01fc0
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
#include "GPIO.h" #include "GPIO.h"
#include "Services_ODO_User.h" #include "Services_ODO_User.h"
#include "TYW_stdint.h" #include "TYW_stdint.h"
#include "DisplaySch_user.h"
#include "DispSch.h"
static uint16_t Fuel_CurSeg; static uint16_t Fuel_CurSeg;
static uint16_t Fuel_CyrStep; static uint16_t Fuel_CyrStep;
...@@ -274,12 +276,20 @@ uint8_t Fuel_Get_Popup_Sta(void) ...@@ -274,12 +276,20 @@ uint8_t Fuel_Get_Popup_Sta(void)
uint16_t variable_5 = 0x00u; uint16_t variable_5 = 0x00u;
uint8_t Popup_Sta = 0u; uint8_t Popup_Sta = 0u;
UElib_uint16_t HMI_MENU_Sta = 0u;
variable_1 = Fuel_Get_CurSeg();/*格*/ variable_1 = Fuel_Get_CurSeg();/*格*/
variable_2 = GetFuelSensorState();/*燃油状态*/ variable_2 = GetFuelSensorState();/*燃油状态*/
variable_5 = GetFuelResistance(); /*采集的阻值*/ variable_5 = GetFuelResistance(); /*采集的阻值*/
if ((variable_1 <= 1 ) && (variable_2 == FuelSensorNormal) && (variable_5 != 65535)) HMI_MENU_Sta = Get_Cur_HMI();
if (
(variable_1 <= 1 ) &&
(variable_2 == FuelSensorNormal) &&
(variable_5 != 65535) &&
((HMI_MENU_Sta == Display_Menu) || (HMI_MENU_Sta == Display_Alarm))
)
{ {
Popup_Sta = 1u; Popup_Sta = 1u;
} }
......
...@@ -10316,3 +10316,9 @@ void Common_Set_MenuDTCNumTime(uint32_t Vol) ...@@ -10316,3 +10316,9 @@ void Common_Set_MenuDTCNumTime(uint32_t Vol)
MenuDTCNumTime = Vol; MenuDTCNumTime = Vol;
MenuGUIDTCNowDis = Vol; MenuGUIDTCNowDis = Vol;
} }
void Common_Set_DTCNumTime(uint32_t Vol)
{
DTCNumTime = Vol;
DTCDispNum = Vol;
}
\ No newline at end of file
...@@ -562,7 +562,7 @@ void Common_EOL_User_Server(void); /**/ ...@@ -562,7 +562,7 @@ void Common_EOL_User_Server(void); /**/
void K_LINE_EOL_Val_Server(void); /**/ void K_LINE_EOL_Val_Server(void); /**/
void Common_Set_MenuDTCNumTime(uint32_t Vol); void Common_Set_MenuDTCNumTime(uint32_t Vol);
void Common_Set_DTCNumTime(uint32_t Vol);
/*-----报警--------------------------------------------------------*/ /*-----报警--------------------------------------------------------*/
void GUI_General_Popup(void); void GUI_General_Popup(void);
void GUI_General_Popup_Display(uint16_t PopupMsg); void GUI_General_Popup_Display(uint16_t PopupMsg);
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include "kwp2000_service.h" #include "kwp2000_service.h"
#include "RTE_CAN.h" #include "RTE_CAN.h"
#include "CAN_FUNC.h" #include "CAN_FUNC.h"
#include "app_Service.h"
uint8_t bMenuSwFlag; uint8_t bMenuSwFlag;
uint8_t g_ClearWin1; uint8_t g_ClearWin1;
...@@ -24,8 +25,6 @@ uint8_t Can_Engine_Oil_Sta; ...@@ -24,8 +25,6 @@ uint8_t Can_Engine_Oil_Sta;
#pragma alignvar(8) #pragma alignvar(8)
_MenuFlag MenuFlag ; _MenuFlag MenuFlag ;
const _MenuOptTab MenuOptTab[] = const _MenuOptTab MenuOptTab[] =
{ {
/*---------ENTER---------------------UP-----------------------DOWN----------------------EXIT------------------ENTER------------------DO-----------------EXIT------------*/ /*---------ENTER---------------------UP-----------------------DOWN----------------------EXIT------------------ENTER------------------DO-----------------EXIT------------*/
...@@ -2198,25 +2197,7 @@ void LevelF1_1Menu_1Exit(void) ...@@ -2198,25 +2197,7 @@ void LevelF1_1Menu_1Exit(void)
/*----工厂模式----DTC显示----刹车*-----*/ /*----工厂模式----DTC显示----刹车*-----*/
void LevelF1_1Menu_2Enter(void) void LevelF1_1Menu_2Enter(void)
{ {}
_CAN_Msg canMag;
canMag.MsgID = 0x18DA0BF0u;
canMag.MsgDLC = 8u;
canMag.MsgPro = 2u;//0u;
canMag.MsgStd = 1u;
canMag.MsgRTR = 0u;
canMag.Msg[0u] = 0x03u;
canMag.Msg[1u] = 0x19u;
canMag.Msg[2u] = 0x01u;
canMag.Msg[3u] = 0x01u;
canMag.Msg[4u] = 0x00u;
canMag.Msg[5u] = 0x00u;
canMag.Msg[6u] = 0x00u;
canMag.Msg[7u] = 0x00u;
Can_Write(&canMag);
}
void LevelF1_1Menu_2Do(void) void LevelF1_1Menu_2Do(void)
{ {
GUI_OftenShow_Display(); GUI_OftenShow_Display();
...@@ -2517,14 +2498,15 @@ void LevelF2_1Menu_1Do(void) ...@@ -2517,14 +2498,15 @@ void LevelF2_1Menu_1Do(void)
} }
} }
void LevelF2_1Menu_1Exit(void) void LevelF2_1Menu_1Exit(void)
{} {
Common_Set_DTCNumTime(0);
}
/*----工厂模式----117 刹车----*/ /*----工厂模式----117 刹车----*/
void LevelF2_1Menu_2Enter(void) void LevelF2_1Menu_2Enter(void)
{ {
//03 19 02 0C 55 55 55 55 /*请求故障码个数*/
_CAN_Msg canMag; _CAN_Msg canMag;
canMag.MsgID = 0x18DA0BF0u; canMag.MsgID = 0x18DA0BF0u;
canMag.MsgDLC = 8u; canMag.MsgDLC = 8u;
canMag.MsgPro = 2u;//0u; canMag.MsgPro = 2u;//0u;
...@@ -2533,8 +2515,8 @@ void LevelF2_1Menu_2Enter(void) ...@@ -2533,8 +2515,8 @@ void LevelF2_1Menu_2Enter(void)
canMag.Msg[0u] = 0x03u; canMag.Msg[0u] = 0x03u;
canMag.Msg[1u] = 0x19u; canMag.Msg[1u] = 0x19u;
canMag.Msg[2u] = 0x02u; canMag.Msg[2u] = 0x01u;
canMag.Msg[3u] = 0x0Cu; canMag.Msg[3u] = 0x01u;
canMag.Msg[4u] = 0x00u; canMag.Msg[4u] = 0x00u;
canMag.Msg[5u] = 0x00u; canMag.Msg[5u] = 0x00u;
canMag.Msg[6u] = 0x00u; canMag.Msg[6u] = 0x00u;
...@@ -2547,8 +2529,31 @@ void LevelF2_1Menu_2Enter(void) ...@@ -2547,8 +2529,31 @@ void LevelF2_1Menu_2Enter(void)
void LevelF2_1Menu_2Do(void) void LevelF2_1Menu_2Do(void)
{ {
uint8_t DTCNumDis = 0x00u; uint8_t DTCNumDis = 0x00u;
_CAN_Msg canMag;
if (Menu_DTC_DisTime != 0x00u) if (DTCBrake_01Sta == 1u)
{
//03 19 02 0C 55 55 55 55
DTCBrake_01Sta = 2u;
canMag.MsgID = 0x18DA0BF0u;
canMag.MsgDLC = 8u;
canMag.MsgPro = 2u;//0u;
canMag.MsgStd = 1u;
canMag.MsgRTR = 0u;
canMag.Msg[0u] = 0x03u;
canMag.Msg[1u] = 0x19u;
canMag.Msg[2u] = 0x02u;
canMag.Msg[3u] = 0x0Cu;
canMag.Msg[4u] = 0x00u;
canMag.Msg[5u] = 0x00u;
canMag.Msg[6u] = 0x00u;
canMag.Msg[7u] = 0x00u;
Can_Write(&canMag);
}
if ((Menu_DTC_DisTime != 0x00u) && (DTCBrake_01Sta == 2u))
{ {
Menu_DTC_DisTime--; Menu_DTC_DisTime--;
} }
...@@ -2574,7 +2579,9 @@ void LevelF2_1Menu_2Do(void) ...@@ -2574,7 +2579,9 @@ void LevelF2_1Menu_2Do(void)
} }
} }
void LevelF2_1Menu_2Exit(void) void LevelF2_1Menu_2Exit(void)
{} {
Common_Set_DTCNumTime(0);
}
/*----工厂模式----118 变速箱----*/ /*----工厂模式----118 变速箱----*/
void LevelF2_1Menu_3Enter(void) void LevelF2_1Menu_3Enter(void)
...@@ -2631,7 +2638,9 @@ void LevelF2_1Menu_3Do(void) ...@@ -2631,7 +2638,9 @@ void LevelF2_1Menu_3Do(void)
} }
} }
void LevelF2_1Menu_3Exit(void) void LevelF2_1Menu_3Exit(void)
{} {
Common_Set_DTCNumTime(0);
}
/*----工厂模式----119 雷达----*/ /*----工厂模式----119 雷达----*/
void LevelF2_1Menu_4Enter(void) void LevelF2_1Menu_4Enter(void)
...@@ -2688,7 +2697,9 @@ void LevelF2_1Menu_4Do(void) ...@@ -2688,7 +2697,9 @@ void LevelF2_1Menu_4Do(void)
} }
} }
void LevelF2_1Menu_4Exit(void) void LevelF2_1Menu_4Exit(void)
{} {
Common_Set_DTCNumTime(0);
}
/*----工厂模式----120 摄像头----*/ /*----工厂模式----120 摄像头----*/
void LevelF2_1Menu_5Enter(void) void LevelF2_1Menu_5Enter(void)
...@@ -2745,7 +2756,9 @@ void LevelF2_1Menu_5Do(void) ...@@ -2745,7 +2756,9 @@ void LevelF2_1Menu_5Do(void)
} }
} }
void LevelF2_1Menu_5Exit(void) void LevelF2_1Menu_5Exit(void)
{} {
Common_Set_DTCNumTime(0);
}
/*----工厂模式----121 液缓----*/ /*----工厂模式----121 液缓----*/
void LevelF2_1Menu_6Enter(void) void LevelF2_1Menu_6Enter(void)
...@@ -2802,7 +2815,9 @@ void LevelF2_1Menu_6Do(void) ...@@ -2802,7 +2815,9 @@ void LevelF2_1Menu_6Do(void)
} }
} }
void LevelF2_1Menu_6Exit(void) void LevelF2_1Menu_6Exit(void)
{} {
Common_Set_DTCNumTime(0);
}
/*----工厂模式----清除发动机----*/ /*----工厂模式----清除发动机----*/
void LevelF2_2Menu_1Enter(void) void LevelF2_2Menu_1Enter(void)
...@@ -3534,14 +3549,15 @@ void LevelD2_1Menu_1Do(void) ...@@ -3534,14 +3549,15 @@ void LevelD2_1Menu_1Do(void)
} }
} }
void LevelD2_1Menu_1Exit(void) void LevelD2_1Menu_1Exit(void)
{} {
Common_Set_DTCNumTime(0);
}
/*----经销商模式----刹车----*/ /*----经销商模式----刹车----*/
void LevelD2_1Menu_2Enter(void) void LevelD2_1Menu_2Enter(void)
{ {
//03 19 02 0C 55 55 55 55 /*请求故障码个数*/
_CAN_Msg canMag; _CAN_Msg canMag;
canMag.MsgID = 0x18DA0BF0u; canMag.MsgID = 0x18DA0BF0u;
canMag.MsgDLC = 8u; canMag.MsgDLC = 8u;
canMag.MsgPro = 2u;//0u; canMag.MsgPro = 2u;//0u;
...@@ -3550,8 +3566,8 @@ void LevelD2_1Menu_2Enter(void) ...@@ -3550,8 +3566,8 @@ void LevelD2_1Menu_2Enter(void)
canMag.Msg[0u] = 0x03u; canMag.Msg[0u] = 0x03u;
canMag.Msg[1u] = 0x19u; canMag.Msg[1u] = 0x19u;
canMag.Msg[2u] = 0x02u; canMag.Msg[2u] = 0x01u;
canMag.Msg[3u] = 0x0Cu; canMag.Msg[3u] = 0x01u;
canMag.Msg[4u] = 0x00u; canMag.Msg[4u] = 0x00u;
canMag.Msg[5u] = 0x00u; canMag.Msg[5u] = 0x00u;
canMag.Msg[6u] = 0x00u; canMag.Msg[6u] = 0x00u;
...@@ -3564,8 +3580,32 @@ void LevelD2_1Menu_2Enter(void) ...@@ -3564,8 +3580,32 @@ void LevelD2_1Menu_2Enter(void)
void LevelD2_1Menu_2Do(void) void LevelD2_1Menu_2Do(void)
{ {
uint8_t DTCNumDis = 0x00u; uint8_t DTCNumDis = 0x00u;
_CAN_Msg canMag;
if (Menu_DTC_DisTime != 0x00u) if (DTCBrake_01Sta == 1u)
{
//03 19 02 0C 55 55 55 55
DTCBrake_01Sta = 2u;
canMag.MsgID = 0x18DA0BF0u;
canMag.MsgDLC = 8u;
canMag.MsgPro = 2u;//0u;
canMag.MsgStd = 1u;
canMag.MsgRTR = 0u;
canMag.Msg[0u] = 0x03u;
canMag.Msg[1u] = 0x19u;
canMag.Msg[2u] = 0x02u;
canMag.Msg[3u] = 0x0Cu;
canMag.Msg[4u] = 0x00u;
canMag.Msg[5u] = 0x00u;
canMag.Msg[6u] = 0x00u;
canMag.Msg[7u] = 0x00u;
Can_Write(&canMag);
}
if ((Menu_DTC_DisTime != 0x00u) && (DTCBrake_01Sta == 2))
{ {
Menu_DTC_DisTime--; Menu_DTC_DisTime--;
} }
...@@ -3591,7 +3631,9 @@ void LevelD2_1Menu_2Do(void) ...@@ -3591,7 +3631,9 @@ void LevelD2_1Menu_2Do(void)
} }
} }
void LevelD2_1Menu_2Exit(void) void LevelD2_1Menu_2Exit(void)
{} {
Common_Set_DTCNumTime(0);
}
/*----经销商模式----变速箱----*/ /*----经销商模式----变速箱----*/
void LevelD2_1Menu_3Enter(void) void LevelD2_1Menu_3Enter(void)
...@@ -3648,7 +3690,9 @@ void LevelD2_1Menu_3Do(void) ...@@ -3648,7 +3690,9 @@ void LevelD2_1Menu_3Do(void)
} }
} }
void LevelD2_1Menu_3Exit(void) void LevelD2_1Menu_3Exit(void)
{} {
Common_Set_DTCNumTime(0);
}
/*----经销商模式----雷达----*/ /*----经销商模式----雷达----*/
void LevelD2_1Menu_4Enter(void) void LevelD2_1Menu_4Enter(void)
...@@ -3705,7 +3749,9 @@ void LevelD2_1Menu_4Do(void) ...@@ -3705,7 +3749,9 @@ void LevelD2_1Menu_4Do(void)
} }
} }
void LevelD2_1Menu_4Exit(void) void LevelD2_1Menu_4Exit(void)
{} {
Common_Set_DTCNumTime(0);
}
/*----经销商模式----摄像头----*/ /*----经销商模式----摄像头----*/
void LevelD2_1Menu_5Enter(void) void LevelD2_1Menu_5Enter(void)
...@@ -3762,7 +3808,9 @@ void LevelD2_1Menu_5Do(void) ...@@ -3762,7 +3808,9 @@ void LevelD2_1Menu_5Do(void)
} }
} }
void LevelD2_1Menu_5Exit(void) void LevelD2_1Menu_5Exit(void)
{} {
Common_Set_DTCNumTime(0);
}
/*----经销商模式----液缓----*/ /*----经销商模式----液缓----*/
void LevelD2_1Menu_6Enter(void) void LevelD2_1Menu_6Enter(void)
...@@ -3819,7 +3867,9 @@ void LevelD2_1Menu_6Do(void) ...@@ -3819,7 +3867,9 @@ void LevelD2_1Menu_6Do(void)
} }
} }
void LevelD2_1Menu_6Exit(void) void LevelD2_1Menu_6Exit(void)
{} {
Common_Set_DTCNumTime(0);
}
/*----经销商模式----清除发动机----*/ /*----经销商模式----清除发动机----*/
void LevelD2_2Menu_1Enter(void) void LevelD2_2Menu_1Enter(void)
......
...@@ -30,6 +30,7 @@ _DiagReciveDTC DiagReciveDTCRetarder; ...@@ -30,6 +30,7 @@ _DiagReciveDTC DiagReciveDTCRetarder;
_DiagReciveGaugePara DiagReciveGaugePara; _DiagReciveGaugePara DiagReciveGaugePara;
//volatile uint32_t CrcCheckSum; //volatile uint32_t CrcCheckSum;
uint32_t DTCBrake_01Sta;
uint8_t NormalCanSt = 0; uint8_t NormalCanSt = 0;
uint8_t NMCanSt = 0; uint8_t NMCanSt = 0;
...@@ -1256,7 +1257,11 @@ void App_59_service(_N_USData *AppUSData) ...@@ -1256,7 +1257,11 @@ void App_59_service(_N_USData *AppUSData)
(void)memset((uint8_t *)&DiagReciveDTCBrake.UnionDTC, 0, sizeof(_DiagReciveDTC)); (void)memset((uint8_t *)&DiagReciveDTCBrake.UnionDTC, 0, sizeof(_DiagReciveDTC));
if (AppUSData->ind.Length > 1) if (AppUSData->ind.Length > 1)
{ {
if (AppUSData->ind.MsgData[1] == 0x02) if (AppUSData->ind.MsgData[1] == 0x01)
{
DTCBrake_01Sta = 1u;
}
else if (AppUSData->ind.MsgData[1] == 0x02)
{ {
App_CopyRam((uint8_t *)&DiagReciveDTCBrake.UnionDTC, (uint8_t *)&AppUSData->ind.MsgData[3], (AppUSData->ind.Length - 3)); App_CopyRam((uint8_t *)&DiagReciveDTCBrake.UnionDTC, (uint8_t *)&AppUSData->ind.MsgData[3], (AppUSData->ind.Length - 3));
} }
......
...@@ -16,6 +16,8 @@ extern volatile _DiagnoCtl DiagnoCtl; ...@@ -16,6 +16,8 @@ extern volatile _DiagnoCtl DiagnoCtl;
extern volatile _DiagClock DiagClock; extern volatile _DiagClock DiagClock;
extern volatile _ErrorFrame Error; extern volatile _ErrorFrame Error;
extern uint32_t DTCBrake_01Sta;
extern void App_SetSequenceTimer(uint32_t Second, _DiagClock *T); extern void App_SetSequenceTimer(uint32_t Second, _DiagClock *T);
extern uint8_t App_SequenceTimerOver(_DiagClock *T); extern uint8_t App_SequenceTimerOver(_DiagClock *T);
......
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