Commit a396dc38 authored by 陈家乐's avatar 陈家乐

🐞 fix:52963 胎压从学习成功改为学习中,外发显示错误,仪表显示错误

parent 19a05634
......@@ -26,8 +26,8 @@ void Data_TPMS_KL30_Init ( void )
TPMS.TPMS_Rear_FirstLearn_Flag = MenuData.TPMS_Rear_FirstLearn_Flag;
TPMS.TPMS_LOST = 0;
LearnTime_Count = 6001;
LearnTime_Count1 = 6001;
LearnTime_Count = 0;//6001;
LearnTime_Count1 = 0;//6001;
Can_341_Flg = 0;
}
......@@ -45,8 +45,8 @@ void Data_TPMS_KL15_WAKE_UP_Init ( void )
TPMS.TPMS_Rear_FirstLearn_Flag = MenuData.TPMS_Rear_FirstLearn_Flag;
TPMS.TPMS_LOST = 0;
LearnTime_Count = 6001;
LearnTime_Count1 = 6001;
LearnTime_Count = 0;//6001;
LearnTime_Count1 = 0;//6001;
Can_341_Flg = 0;
}
......@@ -76,6 +76,35 @@ void Data_TPMS_Processing_Service ( void )
}
if(CAN_MSG_Status(&CAN_CH0_CanMsgOp, CAN_CH0_ID_CAN_0x373_Msg_Count) != CAN_SIG_LOST)
{
if((Get_CAN_CH0_ID_373_Sig_Rear_id() != 0) && (Get_CAN_CH0_ID_373_Sig_Rear_id() != 0xFFFFFFFF))
{
TPMS.TPMS_Rear_ID_Value = 1;
//TPMS.TPMS_Rear_Learn = LearningCompletion;
}
else
{
TPMS.TPMS_Rear_ID_Value = 0;
}
if((Get_CAN_CH0_ID_373_Sig_Front_id() != 0) && (Get_CAN_CH0_ID_373_Sig_Front_id() != 0xFFFFFFFF))
{
TPMS.TPMS_Front_ID_Value = 1;
//TPMS.TPMS_Front_Learn = LearningCompletion;
}
else
{
TPMS.TPMS_Front_ID_Value = 0;
}
}
else
{
TPMS.TPMS_Front_ID_Value = 0;
TPMS.TPMS_Rear_ID_Value = 0;
}
if(TPMS.TPMS_Front_Learn == 0x0)
{
if(LearnTime_Count <= 6000)
......@@ -112,6 +141,16 @@ void Data_TPMS_Processing_Service ( void )
}
else if(TPMS.TPMS_Front_Learn == 0x1)
{
//if((Get_CAN_CH0_ID_373_Sig_Front_id() != 0) && (Get_CAN_CH0_ID_373_Sig_Front_id() != 0xFFFFFFFF))
//{
// TPMS.TPMS_Front_ID_Value = 1;
// //TPMS.TPMS_Front_Learn = LearningCompletion;
//}
//else
//{
// TPMS.TPMS_Front_ID_Value = 0;
//}
if(TPMS.TPMS_Front_Timeclean == 0)
{
LearnTime_Count = 0;
......@@ -144,15 +183,15 @@ void Data_TPMS_Processing_Service ( void )
else if (TPMS.TPMS_Front_Learn == 0x2)
{
LearnTime_Count = 0;
if((Get_CAN_CH0_ID_373_Sig_Front_id() != 0) && (Get_CAN_CH0_ID_373_Sig_Front_id() != 0xFFFFFFFF))
{
TPMS.TPMS_Front_ID_Value = 1;
//TPMS.TPMS_Front_Learn = LearningCompletion;
}
else
{
TPMS.TPMS_Front_ID_Value = 0;
}
//if((Get_CAN_CH0_ID_373_Sig_Front_id() != 0) && (Get_CAN_CH0_ID_373_Sig_Front_id() != 0xFFFFFFFF))
//{
// TPMS.TPMS_Front_ID_Value = 1;
// //TPMS.TPMS_Front_Learn = LearningCompletion;
//}
//else
//{
// TPMS.TPMS_Front_ID_Value = 0;
//}
}
else if (TPMS.TPMS_Front_Learn == 0x3)
......@@ -199,6 +238,12 @@ void Data_TPMS_Processing_Service ( void )
}
else if(TPMS.TPMS_Rear_Learn == 0x1)
{
if(TPMS.TPMS_Rear_Timeclean == 0)
{
LearnTime_Count1 = 0;
}
TPMS.TPMS_Rear_Timeclean = 1;
if(LearnTime_Count1 <= 6000)
{
LearnTime_Count1++;
......@@ -206,11 +251,7 @@ void Data_TPMS_Processing_Service ( void )
}
else
{
if(TPMS.TPMS_Rear_Timeclean == 0)
{
LearnTime_Count1 = 0;
}
TPMS.TPMS_Rear_Timeclean = 1;
if ((MenuData.TPMS_Rear_Learn != 0x2) && (MenuData.TPMS_Rear_Learn != 0x3) )
{
if(CAN_MSG_Status(&CAN_CH0_CanMsgOp, CAN_CH0_ID_CAN_0x341_Msg_Count) != CAN_SIG_LOST)
......@@ -265,23 +306,26 @@ void Data_TPMS_Processing_Service ( void )
TPMS.TPMS_Rear_FirstLearn_Flag = 1;
}
if((TPMS.TPMS_Front_Learn == 0x2) || (TPMS.TPMS_Front_Learn == 0x3))
{
MenuData.TPMS_Front_Learn = TPMS.TPMS_Front_Learn;
}
if((TPMS.TPMS_Rear_Learn == 0x2) || (TPMS.TPMS_Rear_Learn == 0x3))
{
MenuData.TPMS_Rear_Learn = TPMS.TPMS_Rear_Learn;
}
//if((TPMS.TPMS_Front_Learn == 0x2) || (TPMS.TPMS_Front_Learn == 0x3))
//{
// MenuData.TPMS_Front_Learn = TPMS.TPMS_Front_Learn;
//}
//if((TPMS.TPMS_Rear_Learn == 0x2) || (TPMS.TPMS_Rear_Learn == 0x3))
//{
// MenuData.TPMS_Rear_Learn = TPMS.TPMS_Rear_Learn;
//}
if(((TPMS.TPMS_Front_Learn == 0x2) || (TPMS.TPMS_Front_Learn == 0x3)) && (TPMS.TPMS_Front_Learn != MenuData.TPMS_Front_Learn))
{
MenuData.TPMS_Front_Learn = TPMS.TPMS_Front_Learn;
TPMS_L[0] = MenuData.TPMS_Front_Learn;
TPMS_L[1] = MenuData.TPMS_Rear_Learn;
Data_User_EEPROM_Write(EM_MenuData_TPMS_LEARN, (uint32_t*)TPMS_L, 1u);
}
if( ((TPMS.TPMS_Rear_Learn == 0x2) || (TPMS.TPMS_Rear_Learn == 0x3)) && (TPMS.TPMS_Rear_Learn != MenuData.TPMS_Rear_Learn))
{
MenuData.TPMS_Rear_Learn = TPMS.TPMS_Rear_Learn;
TPMS_L[0] = MenuData.TPMS_Front_Learn;
TPMS_L[1] = MenuData.TPMS_Rear_Learn;
Data_User_EEPROM_Write(EM_MenuData_TPMS_LEARN, (uint32_t*)TPMS_L, 1u);
......
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