Commit 54438576 authored by hu's avatar hu

根据邮件车厂邮件要求,调整第四组报警功能

parent 93c0ccab
...@@ -259,8 +259,6 @@ void Popups_Polling(void) ...@@ -259,8 +259,6 @@ void Popups_Polling(void)
/*----第四组---------------------------------------------------------------------*/ /*----第四组---------------------------------------------------------------------*/
if (E_Speed < 350u) if (E_Speed < 350u)
{
if (K_Line_Set.K_Line_LID2B == 0x00u)
{ {
/*11.--1--充电异常(系统检测)*/ /*11.--1--充电异常(系统检测)*/
variable_1 = Line_In_Get_Status(LINE_IN_CHARGE); variable_1 = Line_In_Get_Status(LINE_IN_CHARGE);
...@@ -289,17 +287,11 @@ void Popups_Polling(void) ...@@ -289,17 +287,11 @@ void Popups_Polling(void)
{ {
Popup_Delete(POPUP4_OIL_PRESSURE); Popup_Delete(POPUP4_OIL_PRESSURE);
} }
}
else
{
Popup_Clear(POPUT4_ABNORMAL_CHARGE);
Popup_Clear(POPUP4_OIL_PRESSURE);
}
/*13.--3--AMT初始化异常 DM1 SPN4220 Key On時*/ /*13.--3--AMT初始化异常 DM1 SPN4220 Key On時*/
variable_4 = Get_ID_18FECA03_Sig_SPN(); variable_4 = Get_ID_18FECA03_Sig_SPN();
if ((variable_4 == 4220u) && (K_Line_Set.K_Line_LID41 == 0x13u)) if ((variable_4 == 4220u) && (E_Speed > 350u) && (K_Line_Set.K_Line_LID41 == 0x13u))
{ {
Popup_Request(POPUP4_AMT_INIT_EXCE); Popup_Request(POPUP4_AMT_INIT_EXCE);
} }
...@@ -341,7 +333,7 @@ void Popups_Polling(void) ...@@ -341,7 +333,7 @@ void Popups_Polling(void)
/*17.--7--AMT初始化结束 DM1 SPN4021 Key On時*/ /*17.--7--AMT初始化结束 DM1 SPN4021 Key On時*/
variable_4 = Get_ID_18FECA03_Sig_SPN(); variable_4 = Get_ID_18FECA03_Sig_SPN();
if ((variable_4 == 4021u) && (K_Line_Set.K_Line_LID41 == 0x13u)) if ((variable_4 == 4021u) && (E_Speed > 350u) && (K_Line_Set.K_Line_LID41 == 0x13u))
{ {
Popup_Request(POPUP4_START_ENG); Popup_Request(POPUP4_START_ENG);
} }
......
...@@ -119,6 +119,7 @@ unsigned char kwp_EcuReset(unsigned char *TxData, unsigned char *RequestData) ...@@ -119,6 +119,7 @@ unsigned char kwp_EcuReset(unsigned char *TxData, unsigned char *RequestData)
unsigned char kwp_TesterPresent(unsigned char *TxData, unsigned char *RequestData) unsigned char kwp_TesterPresent(unsigned char *TxData, unsigned char *RequestData)
{ {
unsigned char Tx_Len = 0; unsigned char Tx_Len = 0;
(*TxData) = KWP2000_TESTERPRESENT_REQUEST + KWP2000_POSITIVE_RESPONSE_OFFSET; (*TxData) = KWP2000_TESTERPRESENT_REQUEST + KWP2000_POSITIVE_RESPONSE_OFFSET;
Tx_Len = 1; Tx_Len = 1;
return Tx_Len; return Tx_Len;
...@@ -135,6 +136,7 @@ unsigned char kwp_TesterPresent(unsigned char *TxData, unsigned char *RequestDat ...@@ -135,6 +136,7 @@ unsigned char kwp_TesterPresent(unsigned char *TxData, unsigned char *RequestDat
unsigned char kwp_StartCommunication(unsigned char *TxData, unsigned char *RequestData) unsigned char kwp_StartCommunication(unsigned char *TxData, unsigned char *RequestData)
{ {
unsigned char Tx_Len = 0; unsigned char Tx_Len = 0;
K_LINE_SIGNAL_FLAG.RecvStart = 1; K_LINE_SIGNAL_FLAG.RecvStart = 1;
(*TxData++) = KWP2000_STARTCOMMUNICATION_REQUEST + KWP2000_POSITIVE_RESPONSE_OFFSET; (*TxData++) = KWP2000_STARTCOMMUNICATION_REQUEST + KWP2000_POSITIVE_RESPONSE_OFFSET;
...@@ -156,6 +158,7 @@ unsigned char kwp_StartCommunication(unsigned char *TxData, unsigned char *Reque ...@@ -156,6 +158,7 @@ unsigned char kwp_StartCommunication(unsigned char *TxData, unsigned char *Reque
unsigned char kwp_StopCommunication(unsigned char *TxData, unsigned char *RequestData) unsigned char kwp_StopCommunication(unsigned char *TxData, unsigned char *RequestData)
{ {
unsigned char Tx_Len = 0; unsigned char Tx_Len = 0;
if (K_LINE_SIGNAL_FLAG.RecvStart == 1) if (K_LINE_SIGNAL_FLAG.RecvStart == 1)
{ {
K_LINE_SIGNAL_FLAG.RecvStart = 0; /*EOL诊断结束标识*/ K_LINE_SIGNAL_FLAG.RecvStart = 0; /*EOL诊断结束标识*/
...@@ -182,6 +185,7 @@ unsigned char kwp_StopCommunication(unsigned char *TxData, unsigned char *Reques ...@@ -182,6 +185,7 @@ unsigned char kwp_StopCommunication(unsigned char *TxData, unsigned char *Reques
unsigned char kwp_readEcuIdentification(unsigned char *TxData, unsigned char *RequestData) unsigned char kwp_readEcuIdentification(unsigned char *TxData, unsigned char *RequestData)
{ {
unsigned char Tx_Len = 0; unsigned char Tx_Len = 0;
switch (RequestData[0]) /* subFunction */ switch (RequestData[0]) /* subFunction */
{ {
case 0x81: /* ECUIdentificationScalingTable */ case 0x81: /* ECUIdentificationScalingTable */
...@@ -195,7 +199,7 @@ unsigned char kwp_readEcuIdentification(unsigned char *TxData, unsigned char *Re ...@@ -195,7 +199,7 @@ unsigned char kwp_readEcuIdentification(unsigned char *TxData, unsigned char *Re
break; break;
case 0x91: /* vehicleManufacturerECUHardwareNumber */ case 0x91: /* vehicleManufacturerECUHardwareNumber */
(*TxData++) = KWP2000_READECUIDENTIFICATION_REQUEST + KWP2000_POSITIVE_RESPONSE_OFFSET; (*TxData++) = KWP2000_READECUIDENTIFICATION_REQUEST + KWP2000_POSITIVE_RESPONSE_OFFSET;
(*TxData++) = RequestData[0]; // ISUZU Parts No. 8979683010 (*TxData++) = RequestData[0]; /* ISUZU Parts No. 8979683010 */
(*TxData++) = K_Line_Set.No_Digit1; (*TxData++) = K_Line_Set.No_Digit1;
(*TxData++) = K_Line_Set.No_Digit2; (*TxData++) = K_Line_Set.No_Digit2;
(*TxData++) = K_Line_Set.No_Digit3; (*TxData++) = K_Line_Set.No_Digit3;
...@@ -227,6 +231,7 @@ unsigned char kwp_writeDataByLocalIdentifier(unsigned char *TxData, unsigned cha ...@@ -227,6 +231,7 @@ unsigned char kwp_writeDataByLocalIdentifier(unsigned char *TxData, unsigned cha
{ {
unsigned char Tx_Len = 0; unsigned char Tx_Len = 0;
unsigned char CupFlag = 0; unsigned char CupFlag = 0;
if ((K_Line_Set.KLINE == 0) || ((K_Line_Set.KLINE == 1) && (K_LINE_SIGNAL_FLAG.SendSeedEQUSRecvSeed == 1))) if ((K_Line_Set.KLINE == 0) || ((K_Line_Set.KLINE == 1) && (K_LINE_SIGNAL_FLAG.SendSeedEQUSRecvSeed == 1)))
{ {
switch (RequestData[0]) /* */ switch (RequestData[0]) /* */
...@@ -679,6 +684,7 @@ unsigned char kwp_readDataByLocalIdentifier(unsigned char *TxData, unsigned char ...@@ -679,6 +684,7 @@ unsigned char kwp_readDataByLocalIdentifier(unsigned char *TxData, unsigned char
{ {
unsigned char Tx_Len = 0; unsigned char Tx_Len = 0;
unsigned int ECUStatusCup = 0; unsigned int ECUStatusCup = 0;
switch (RequestData[0]) /* subFunction */ switch (RequestData[0]) /* subFunction */
{ {
case 0x20: /* 应对ECE R13 */ case 0x20: /* 应对ECE R13 */
...@@ -1099,6 +1105,7 @@ unsigned char kwp_readDataByLocalIdentifier(unsigned char *TxData, unsigned char ...@@ -1099,6 +1105,7 @@ unsigned char kwp_readDataByLocalIdentifier(unsigned char *TxData, unsigned char
unsigned char kwp_readDataByCommonIdentifier(unsigned char *TxData, unsigned char *RequestData) unsigned char kwp_readDataByCommonIdentifier(unsigned char *TxData, unsigned char *RequestData)
{ {
unsigned char Tx_Len = 0; unsigned char Tx_Len = 0;
return Tx_Len; return Tx_Len;
} }
/*------------------------------------------------------------------------- /*-------------------------------------------------------------------------
...@@ -1194,6 +1201,7 @@ unsigned char kwp_readDataAccessMode(unsigned char *TxData, unsigned char *Reque ...@@ -1194,6 +1201,7 @@ unsigned char kwp_readDataAccessMode(unsigned char *TxData, unsigned char *Reque
unsigned char kwp_StartroutInebykocalIdentifier(unsigned char *TxData, unsigned char *RequestData) unsigned char kwp_StartroutInebykocalIdentifier(unsigned char *TxData, unsigned char *RequestData)
{ {
unsigned char Tx_Len = 0; unsigned char Tx_Len = 0;
switch (RequestData[0]) /* */ switch (RequestData[0]) /* */
{ {
case 0x08: /* */ case 0x08: /* */
...@@ -1222,6 +1230,7 @@ unsigned char kwp_StartroutInebykocalIdentifier(unsigned char *TxData, unsigned ...@@ -1222,6 +1230,7 @@ unsigned char kwp_StartroutInebykocalIdentifier(unsigned char *TxData, unsigned
unsigned char kwp_readDataStatusofDTC(unsigned char *TxData, unsigned char *RequestData) unsigned char kwp_readDataStatusofDTC(unsigned char *TxData, unsigned char *RequestData)
{ {
unsigned char Tx_Len = 0; unsigned char Tx_Len = 0;
switch (RequestData[0]) /* subFunction */ switch (RequestData[0]) /* subFunction */
{ {
case 0x00: /* */ case 0x00: /* */
...@@ -1319,6 +1328,7 @@ unsigned char kwp_readDataStatusofDTC(unsigned char *TxData, unsigned char *Requ ...@@ -1319,6 +1328,7 @@ unsigned char kwp_readDataStatusofDTC(unsigned char *TxData, unsigned char *Requ
unsigned char kwp_ClearDiagnosticInformation(unsigned char *TxData, unsigned char *RequestData) unsigned char kwp_ClearDiagnosticInformation(unsigned char *TxData, unsigned char *RequestData)
{ {
unsigned char Tx_Len = 0; unsigned char Tx_Len = 0;
switch (RequestData[0]) /* subFunction */ switch (RequestData[0]) /* subFunction */
{ {
case 0xFF: /* */ case 0xFF: /* */
...@@ -1432,6 +1442,14 @@ void Common_Set_DTCstatusCHGFFK_Flag(unsigned char Val) ...@@ -1432,6 +1442,14 @@ void Common_Set_DTCstatusCHGFFK_Flag(unsigned char Val)
DTCstatusCHGFFK_Line = Val; DTCstatusCHGFFK_Line = Val;
} }
/*-------------------------------------------------------------------------
* Function Name : K_LINE_EOL_InitVal
* Description : k-line数据初始化
* Input :
* Output : None
* Return : None
* onther :
--------------------------------------------------------------------------*/
void K_LINE_EOL_InitVal(void) void K_LINE_EOL_InitVal(void)
{ {
K_Line_Set.Flag = 0x7AA7A55Au; K_Line_Set.Flag = 0x7AA7A55Au;
...@@ -1488,26 +1506,27 @@ void K_LINE_EOL_InitVal(void) ...@@ -1488,26 +1506,27 @@ void K_LINE_EOL_InitVal(void)
K_Line_Set.K_Line_LID51 = 0x01u; /* 01 工作模式 */ K_Line_Set.K_Line_LID51 = 0x01u; /* 01 工作模式 */
K_Line_Set.K_Line_LID52 = 0x00u; /* 00 电子部件设定 */ K_Line_Set.K_Line_LID52 = 0x00u; /* 00 电子部件设定 */
K_Line_Set.No_Digit1 = 0x38u; //01 K_Line_Set.KLINE = 0x00u;
K_Line_Set.No_Digit2 = 0x39u; //02 K_Line_Set.No_Digit1 = 0x38u; /* 01 */
K_Line_Set.No_Digit3 = 0x37u; //03 K_Line_Set.No_Digit2 = 0x39u; /* 02 */
K_Line_Set.No_Digit4 = 0x39u; //04 K_Line_Set.No_Digit3 = 0x37u; /* 03 */
K_Line_Set.No_Digit5 = 0x36u; //05 K_Line_Set.No_Digit4 = 0x39u; /* 04 */
K_Line_Set.No_Digit6 = 0x38u; //06 K_Line_Set.No_Digit5 = 0x36u; /* 05 */
K_Line_Set.No_Digit7 = 0x33u; //07 K_Line_Set.No_Digit6 = 0x38u; /* 06 */
K_Line_Set.No_Digit8 = 0x30u; //08 K_Line_Set.No_Digit7 = 0x33u; /* 07 */
K_Line_Set.No_Digit9 = 0x31u; //09 K_Line_Set.No_Digit8 = 0x30u; /* 08 */
K_Line_Set.No_Digit10 = 0x30u; //10 K_Line_Set.No_Digit9 = 0x31u; /* 09 */
K_Line_Set.ECUStatus1 = 0x00u; //11 K_Line_Set.No_Digit10 = 0x30u; /* 10 */
K_Line_Set.ECUStatus2 = 0x00u; //12 K_Line_Set.ECUStatus1 = 0x00u; /* 11 */
K_Line_Set.ECUStatus3 = 0x00u; //13 K_Line_Set.ECUStatus2 = 0x00u; /* 12 */
K_Line_Set.ECUStatus4 = 0x00u; //14 K_Line_Set.ECUStatus3 = 0x00u; /* 13 */
K_Line_Set.ECUStatus5 = 0x00u; //15 K_Line_Set.ECUStatus4 = 0x00u; /* 14 */
K_Line_Set.METERCOUNT = 0x00u; //16 K_Line_Set.ECUStatus5 = 0x00u; /* 15 */
K_Line_Set.NoOfDTCFF00 = 0x00u; //17 K_Line_Set.METERCOUNT = 0x00u; /* 16 */
K_Line_Set.NoOfDTC8000 = 0x00u; //18 K_Line_Set.NoOfDTCFF00 = 0x00u; /* 17 */
K_Line_Set.TesterECU = 0x00u; //19 K_Line_Set.NoOfDTC8000 = 0x00u; /* 18 */
K_Line_Set.TesterECUCAN = 0x00u; //20 K_Line_Set.TesterECU = 0x00u; /* 19 */
K_Line_Set.User_Light1 = 10u; K_Line_Set.TesterECUCAN = 0x00u; /* 20 */
K_Line_Set.User_Light2 = 10u; K_Line_Set.User_Light1 = 10u; /*背光亮度等级*/
K_Line_Set.User_Light2 = 10u; /*背光亮度等级*/
} }
\ No newline at end of file
...@@ -136,7 +136,9 @@ void Buzzer_Play_ISR(void) ...@@ -136,7 +136,9 @@ void Buzzer_Play_ISR(void)
if (BuzzerPlayCtrl.Mode) if (BuzzerPlayCtrl.Mode)
{ {
if (BuzzerPlayCtrl.Timer) if (BuzzerPlayCtrl.Timer)
{
BuzzerPlayCtrl.Timer--; BuzzerPlayCtrl.Timer--;
}
if (BuzzerPlayCtrl.Timer == 0) if (BuzzerPlayCtrl.Timer == 0)
{ {
...@@ -151,7 +153,9 @@ void Buzzer_Play_ISR(void) ...@@ -151,7 +153,9 @@ void Buzzer_Play_ISR(void)
TimerB_PWM_Channel_Start(BUZZER_PWM_CHANNEL); TimerB_PWM_Channel_Start(BUZZER_PWM_CHANNEL);
} }
else else
{
TimerB_PWM_Channel_Stop(BUZZER_PWM_CHANNEL); TimerB_PWM_Channel_Stop(BUZZER_PWM_CHANNEL);
}
BuzzerPlayCtrl.Timer = SndTracks[BuzzerPlayCtrl.Track].Note[BuzzerPlayCtrl.Note].Interval * 20; BuzzerPlayCtrl.Timer = SndTracks[BuzzerPlayCtrl.Track].Note[BuzzerPlayCtrl.Note].Interval * 20;
BuzzerPlayCtrl.Fade = SndTracks[BuzzerPlayCtrl.Track].Note[BuzzerPlayCtrl.Note].Fade * 20; BuzzerPlayCtrl.Fade = SndTracks[BuzzerPlayCtrl.Track].Note[BuzzerPlayCtrl.Note].Fade * 20;
...@@ -160,7 +164,9 @@ void Buzzer_Play_ISR(void) ...@@ -160,7 +164,9 @@ void Buzzer_Play_ISR(void)
else else
{ {
if (BuzzerPlayCtrl.Mode == BUZZER_MODE_LOOP) if (BuzzerPlayCtrl.Mode == BUZZER_MODE_LOOP)
{
BuzzerPlayCtrl.Note = 0; BuzzerPlayCtrl.Note = 0;
}
else else
{ {
BUZZER_CTRL = 0; BUZZER_CTRL = 0;
......
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