Commit 54438576 authored by hu's avatar hu

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

parent 93c0ccab
......@@ -260,46 +260,38 @@ void Popups_Polling(void)
/*----第四组---------------------------------------------------------------------*/
if (E_Speed < 350u)
{
if (K_Line_Set.K_Line_LID2B == 0x00u)
/*11.--1--充电异常(系统检测)*/
variable_1 = Line_In_Get_Status(LINE_IN_CHARGE);
variable_2 = Gui_Get_Voltmeter_DisplayMode(); /*当前电压格数*/
variable_3 = Get_Voltmeter_Valid();
if ((variable_1 == LINE_IN_LOGIC_VALID) || ((variable_2 < 4u) && (variable_3 == 1u)))
{
Popup_Request(POPUT4_ABNORMAL_CHARGE);
}
else
{
Popup_Delete(POPUT4_ABNORMAL_CHARGE);
}
/*12.--2--油压(系统检测)*/
variable_1 = Line_In_Get_Status(LINE_IN_ENG_OIL);
variable_2 = Gui_Get_Voltmeter_DisplayMode(); /*当前电压格数*/
variable_3 = Get_Voltmeter_Valid();
if ((variable_1 == LINE_IN_LOGIC_VALID) || ((variable_2 < 4u) && (variable_3 == 1u)))
{
/*11.--1--充电异常(系统检测)*/
variable_1 = Line_In_Get_Status(LINE_IN_CHARGE);
variable_2 = Gui_Get_Voltmeter_DisplayMode(); /*当前电压格数*/
variable_3 = Get_Voltmeter_Valid();
if ((variable_1 == LINE_IN_LOGIC_VALID) || ((variable_2 < 4u) && (variable_3 == 1u)))
{
Popup_Request(POPUT4_ABNORMAL_CHARGE);
}
else
{
Popup_Delete(POPUT4_ABNORMAL_CHARGE);
}
/*12.--2--油压(系统检测)*/
variable_1 = Line_In_Get_Status(LINE_IN_ENG_OIL);
variable_2 = Gui_Get_Voltmeter_DisplayMode(); /*当前电压格数*/
variable_3 = Get_Voltmeter_Valid();
if ((variable_1 == LINE_IN_LOGIC_VALID) || ((variable_2 < 4u) && (variable_3 == 1u)))
{
Popup_Request(POPUP4_OIL_PRESSURE);
}
else
{
Popup_Delete(POPUP4_OIL_PRESSURE);
}
Popup_Request(POPUP4_OIL_PRESSURE);
}
else
{
Popup_Clear(POPUT4_ABNORMAL_CHARGE);
Popup_Clear(POPUP4_OIL_PRESSURE);
Popup_Delete(POPUP4_OIL_PRESSURE);
}
/*13.--3--AMT初始化异常 DM1 SPN4220 Key On時*/
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);
}
......@@ -341,7 +333,7 @@ void Popups_Polling(void)
/*17.--7--AMT初始化结束 DM1 SPN4021 Key On時*/
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);
}
......
......@@ -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 Tx_Len = 0;
(*TxData) = KWP2000_TESTERPRESENT_REQUEST + KWP2000_POSITIVE_RESPONSE_OFFSET;
Tx_Len = 1;
return Tx_Len;
......@@ -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 Tx_Len = 0;
K_LINE_SIGNAL_FLAG.RecvStart = 1;
(*TxData++) = KWP2000_STARTCOMMUNICATION_REQUEST + KWP2000_POSITIVE_RESPONSE_OFFSET;
......@@ -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 Tx_Len = 0;
if (K_LINE_SIGNAL_FLAG.RecvStart == 1)
{
K_LINE_SIGNAL_FLAG.RecvStart = 0; /*EOL诊断结束标识*/
......@@ -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 Tx_Len = 0;
switch (RequestData[0]) /* subFunction */
{
case 0x81: /* ECUIdentificationScalingTable */
......@@ -195,7 +199,7 @@ unsigned char kwp_readEcuIdentification(unsigned char *TxData, unsigned char *Re
break;
case 0x91: /* vehicleManufacturerECUHardwareNumber */
(*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_Digit2;
(*TxData++) = K_Line_Set.No_Digit3;
......@@ -227,6 +231,7 @@ unsigned char kwp_writeDataByLocalIdentifier(unsigned char *TxData, unsigned cha
{
unsigned char Tx_Len = 0;
unsigned char CupFlag = 0;
if ((K_Line_Set.KLINE == 0) || ((K_Line_Set.KLINE == 1) && (K_LINE_SIGNAL_FLAG.SendSeedEQUSRecvSeed == 1)))
{
switch (RequestData[0]) /* */
......@@ -679,6 +684,7 @@ unsigned char kwp_readDataByLocalIdentifier(unsigned char *TxData, unsigned char
{
unsigned char Tx_Len = 0;
unsigned int ECUStatusCup = 0;
switch (RequestData[0]) /* subFunction */
{
case 0x20: /* 应对ECE R13 */
......@@ -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 Tx_Len = 0;
return Tx_Len;
}
/*-------------------------------------------------------------------------
......@@ -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 Tx_Len = 0;
switch (RequestData[0]) /* */
{
case 0x08: /* */
......@@ -1222,6 +1230,7 @@ unsigned char kwp_StartroutInebykocalIdentifier(unsigned char *TxData, unsigned
unsigned char kwp_readDataStatusofDTC(unsigned char *TxData, unsigned char *RequestData)
{
unsigned char Tx_Len = 0;
switch (RequestData[0]) /* subFunction */
{
case 0x00: /* */
......@@ -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 Tx_Len = 0;
switch (RequestData[0]) /* subFunction */
{
case 0xFF: /* */
......@@ -1432,6 +1442,14 @@ void Common_Set_DTCstatusCHGFFK_Flag(unsigned char 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)
{
K_Line_Set.Flag = 0x7AA7A55Au;
......@@ -1469,45 +1487,46 @@ void K_LINE_EOL_InitVal(void)
K_Line_Set.K_Line_LID3E = 0x01u; /* 01 胎压匹配功能 //0:胎压功能未匹配 1:匹配 */
K_Line_Set.K_Line_LID3F = 0x00u; /* -- 预留 */
K_Line_Set.K_Line_LID40 = 0x00u; /* 00 发动机种类 */
K_Line_Set.K_Line_LID41 = 0x13u; /* 50 变速器种类&控制 /*初值50*/
K_Line_Set.K_Line_LID42 = 0x00u; /* 00 驻车管道 /*初值 0*/
K_Line_Set.K_Line_LID43 = 0x82u; /* 82 车型 /*初值44*/
K_Line_Set.K_Line_LID44 = 0xFFu; /* FF 速度警报 /*初值FF*/
K_Line_Set.K_Line_LID45 = 0xFFu; /* FF 发动机转速 /*初值FF*/
K_Line_Set.K_Line_LID46 = 0xFFu; /* FF 急加速 /*初值FF*/
K_Line_Set.K_Line_LID47 = 0xFFu; /* FF 急减速 /*初值FF*/
K_Line_Set.K_Line_LID48 = 0xFFu; /* FF 长时间怠速 /*初值FF*/
K_Line_Set.K_Line_LID49 = 0xFFu; /* FF 辅助驻车 /*初值FF*/
K_Line_Set.K_Line_LID4A = 0x32u; /* 37 变速箱油 55000 */
K_Line_Set.K_Line_LID4B = 0x32u; /* 37 差速器油 55000 */
K_Line_Set.K_Line_LID4C = 0x32u; /* 37 离合器油 55000 */
K_Line_Set.K_Line_LID4D = 0x64u; /* 37 动力转向油 55000 */
K_Line_Set.K_Line_LID4E = 0x78u; /* 32 轮胎 50000 */
K_Line_Set.K_Line_LID4F = 0x32u; /* 34 机油&滤清器 22000 */
K_Line_Set.K_Line_LID41 = 0x13u; /* 50 变速器种类&控制 /*初值50*/
K_Line_Set.K_Line_LID42 = 0x00u; /* 00 驻车管道 /*初值 0*/
K_Line_Set.K_Line_LID43 = 0x82u; /* 82 车型 /*初值44*/
K_Line_Set.K_Line_LID44 = 0xFFu; /* FF 速度警报 /*初值FF*/
K_Line_Set.K_Line_LID45 = 0xFFu; /* FF 发动机转速 /*初值FF*/
K_Line_Set.K_Line_LID46 = 0xFFu; /* FF 急加速 /*初值FF*/
K_Line_Set.K_Line_LID47 = 0xFFu; /* FF 急减速 /*初值FF*/
K_Line_Set.K_Line_LID48 = 0xFFu; /* FF 长时间怠速 /*初值FF*/
K_Line_Set.K_Line_LID49 = 0xFFu; /* FF 辅助驻车 /*初值FF*/
K_Line_Set.K_Line_LID4A = 0x32u; /* 37 变速箱油 55000 */
K_Line_Set.K_Line_LID4B = 0x32u; /* 37 差速器油 55000 */
K_Line_Set.K_Line_LID4C = 0x32u; /* 37 离合器油 55000 */
K_Line_Set.K_Line_LID4D = 0x64u; /* 37 动力转向油 55000 */
K_Line_Set.K_Line_LID4E = 0x78u; /* 32 轮胎 50000 */
K_Line_Set.K_Line_LID4F = 0x32u; /* 34 机油&滤清器 22000 */
K_Line_Set.K_Line_LID50 = 0x00u; /* -- 预留 */
K_Line_Set.K_Line_LID51 = 0x01u; /* 01 工作模式 */
K_Line_Set.K_Line_LID52 = 0x00u; /* 00 电子部件设定 */
K_Line_Set.No_Digit1 = 0x38u; //01
K_Line_Set.No_Digit2 = 0x39u; //02
K_Line_Set.No_Digit3 = 0x37u; //03
K_Line_Set.No_Digit4 = 0x39u; //04
K_Line_Set.No_Digit5 = 0x36u; //05
K_Line_Set.No_Digit6 = 0x38u; //06
K_Line_Set.No_Digit7 = 0x33u; //07
K_Line_Set.No_Digit8 = 0x30u; //08
K_Line_Set.No_Digit9 = 0x31u; //09
K_Line_Set.No_Digit10 = 0x30u; //10
K_Line_Set.ECUStatus1 = 0x00u; //11
K_Line_Set.ECUStatus2 = 0x00u; //12
K_Line_Set.ECUStatus3 = 0x00u; //13
K_Line_Set.ECUStatus4 = 0x00u; //14
K_Line_Set.ECUStatus5 = 0x00u; //15
K_Line_Set.METERCOUNT = 0x00u; //16
K_Line_Set.NoOfDTCFF00 = 0x00u; //17
K_Line_Set.NoOfDTC8000 = 0x00u; //18
K_Line_Set.TesterECU = 0x00u; //19
K_Line_Set.TesterECUCAN = 0x00u; //20
K_Line_Set.User_Light1 = 10u;
K_Line_Set.User_Light2 = 10u;
K_Line_Set.KLINE = 0x00u;
K_Line_Set.No_Digit1 = 0x38u; /* 01 */
K_Line_Set.No_Digit2 = 0x39u; /* 02 */
K_Line_Set.No_Digit3 = 0x37u; /* 03 */
K_Line_Set.No_Digit4 = 0x39u; /* 04 */
K_Line_Set.No_Digit5 = 0x36u; /* 05 */
K_Line_Set.No_Digit6 = 0x38u; /* 06 */
K_Line_Set.No_Digit7 = 0x33u; /* 07 */
K_Line_Set.No_Digit8 = 0x30u; /* 08 */
K_Line_Set.No_Digit9 = 0x31u; /* 09 */
K_Line_Set.No_Digit10 = 0x30u; /* 10 */
K_Line_Set.ECUStatus1 = 0x00u; /* 11 */
K_Line_Set.ECUStatus2 = 0x00u; /* 12 */
K_Line_Set.ECUStatus3 = 0x00u; /* 13 */
K_Line_Set.ECUStatus4 = 0x00u; /* 14 */
K_Line_Set.ECUStatus5 = 0x00u; /* 15 */
K_Line_Set.METERCOUNT = 0x00u; /* 16 */
K_Line_Set.NoOfDTCFF00 = 0x00u; /* 17 */
K_Line_Set.NoOfDTC8000 = 0x00u; /* 18 */
K_Line_Set.TesterECU = 0x00u; /* 19 */
K_Line_Set.TesterECUCAN = 0x00u; /* 20 */
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)
if (BuzzerPlayCtrl.Mode)
{
if (BuzzerPlayCtrl.Timer)
{
BuzzerPlayCtrl.Timer--;
}
if (BuzzerPlayCtrl.Timer == 0)
{
......@@ -151,7 +153,9 @@ void Buzzer_Play_ISR(void)
TimerB_PWM_Channel_Start(BUZZER_PWM_CHANNEL);
}
else
{
TimerB_PWM_Channel_Stop(BUZZER_PWM_CHANNEL);
}
BuzzerPlayCtrl.Timer = SndTracks[BuzzerPlayCtrl.Track].Note[BuzzerPlayCtrl.Note].Interval * 20;
BuzzerPlayCtrl.Fade = SndTracks[BuzzerPlayCtrl.Track].Note[BuzzerPlayCtrl.Note].Fade * 20;
......@@ -160,7 +164,9 @@ void Buzzer_Play_ISR(void)
else
{
if (BuzzerPlayCtrl.Mode == BUZZER_MODE_LOOP)
{
BuzzerPlayCtrl.Note = 0;
}
else
{
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