Commit bf0a2e5e authored by 李俭双's avatar 李俭双

🐞 fix:系统通知,胎压未学习状态不判断时间了

parent 2e4a80a8
...@@ -68,43 +68,44 @@ void Data_TPMS_Processing_Service ( void ) ...@@ -68,43 +68,44 @@ void Data_TPMS_Processing_Service ( void )
if(TPMS.TPMS_Front_Learn == 0x0) if(TPMS.TPMS_Front_Learn == 0x0)
{ {
if(LearnTime_Count <= 6000) //if(LearnTime_Count <= 6000)
{ //{
LearnTime_Count++; // LearnTime_Count++;
TPMS.TPMS_Front_Learn = Unstudied; TPMS.TPMS_Front_Learn = Unstudied;
}
else
{
if(TPMS.TPMS_Front_Timeclean == 1)
{
LearnTime_Count = 0; LearnTime_Count = 0;
} //}
TPMS.TPMS_Front_Timeclean = 0; //else
if ((MenuData.TPMS_Front_Learn != 0x2) && (MenuData.TPMS_Front_Learn != 0x3) ) //{
{ // if(TPMS.TPMS_Front_Timeclean == 1)
if(CAN_MSG_Status(&CAN_CH0_CanMsgOp, CAN_CH0_ID_CAN_0x341_Msg_Count) != CAN_SIG_LOST) // {
{ // LearnTime_Count = 0;
TPMS.TPMS_Front_Learn = LearningFailure; // }
} // TPMS.TPMS_Front_Timeclean = 0;
else // if ((MenuData.TPMS_Front_Learn != 0x2) && (MenuData.TPMS_Front_Learn != 0x3) )
{ // {
TPMS.TPMS_Front_Learn = MenuData.TPMS_Front_Learn; // if(CAN_MSG_Status(&CAN_CH0_CanMsgOp, CAN_CH0_ID_CAN_0x341_Msg_Count) != CAN_SIG_LOST)
} // {
// TPMS.TPMS_Front_Learn = LearningFailure;
} // }
else // else
{ // {
TPMS.TPMS_Front_Learn = MenuData.TPMS_Front_Learn; // TPMS.TPMS_Front_Learn = MenuData.TPMS_Front_Learn;
} // }
} //
// }
// else
// {
// TPMS.TPMS_Front_Learn = MenuData.TPMS_Front_Learn;
// }
//}
} }
else if(TPMS.TPMS_Front_Learn == 0x1) else if(TPMS.TPMS_Front_Learn == 0x1)
{ {
if(TPMS.TPMS_Front_Timeclean == 0) //if(TPMS.TPMS_Front_Timeclean == 0)
{ //{
LearnTime_Count = 0; // LearnTime_Count = 0;
} //}
TPMS.TPMS_Front_Timeclean = 1; //TPMS.TPMS_Front_Timeclean = 1;
if(LearnTime_Count <= 6000) if(LearnTime_Count <= 6000)
{ {
LearnTime_Count++; LearnTime_Count++;
...@@ -155,34 +156,34 @@ void Data_TPMS_Processing_Service ( void ) ...@@ -155,34 +156,34 @@ void Data_TPMS_Processing_Service ( void )
if(TPMS.TPMS_Rear_Learn == 0x0) if(TPMS.TPMS_Rear_Learn == 0x0)
{ {
if(LearnTime_Count1 <= 6000) //if(LearnTime_Count1 <= 6000)
{ //{
LearnTime_Count1++;
TPMS.TPMS_Rear_Learn = Unstudied;
}
else
{
if(TPMS.TPMS_Rear_Timeclean == 1)
{
LearnTime_Count1 = 0; LearnTime_Count1 = 0;
} TPMS.TPMS_Rear_Learn = Unstudied;
TPMS.TPMS_Rear_Timeclean = 0; //}
if ((MenuData.TPMS_Rear_Learn != 0x2) && (MenuData.TPMS_Rear_Learn != 0x3) ) //else
{ //{
if(CAN_MSG_Status(&CAN_CH0_CanMsgOp, CAN_CH0_ID_CAN_0x341_Msg_Count) != CAN_SIG_LOST) // if(TPMS.TPMS_Rear_Timeclean == 1)
{ // {
TPMS.TPMS_Rear_Learn = LearningFailure; // LearnTime_Count1 = 0;
} // }
else // TPMS.TPMS_Rear_Timeclean = 0;
{ // if ((MenuData.TPMS_Rear_Learn != 0x2) && (MenuData.TPMS_Rear_Learn != 0x3) )
TPMS.TPMS_Rear_Learn = MenuData.TPMS_Rear_Learn; // {
} // if(CAN_MSG_Status(&CAN_CH0_CanMsgOp, CAN_CH0_ID_CAN_0x341_Msg_Count) != CAN_SIG_LOST)
} // {
else // TPMS.TPMS_Rear_Learn = LearningFailure;
{ // }
TPMS.TPMS_Rear_Learn = MenuData.TPMS_Rear_Learn; // else
} // {
} // TPMS.TPMS_Rear_Learn = MenuData.TPMS_Rear_Learn;
// }
// }
// else
// {
// TPMS.TPMS_Rear_Learn = MenuData.TPMS_Rear_Learn;
// }
//}
} }
else if(TPMS.TPMS_Rear_Learn == 0x1) else if(TPMS.TPMS_Rear_Learn == 0x1)
{ {
......
...@@ -2130,6 +2130,13 @@ void SEG_SET_TPMS_DISPLAY(uint8_t m_Flag, uint16_t m_NUM1, uint16_t m_NUM2, uint ...@@ -2130,6 +2130,13 @@ void SEG_SET_TPMS_DISPLAY(uint8_t m_Flag, uint16_t m_NUM1, uint16_t m_NUM2, uint
IC2_SEG109 = IC_SEG_OFF; IC2_SEG109 = IC_SEG_OFF;
IC2_SEG110 = IC_SEG_ON; IC2_SEG110 = IC_SEG_ON;
if(Get_TPMS_CAN_LOST() == 0)
{
IC2_SEG138 = IC_SEG_ON;
IC2_SEG118 = IC_SEG_ON;
}
else
{
if ((Get_Current_PageType() == Page_Front_Tpms) || (Get_Front_FirstLearn_Flag() == 1) || (Get_Front_FirstLearn_Flag() == 3)) if ((Get_Current_PageType() == Page_Front_Tpms) || (Get_Front_FirstLearn_Flag() == 1) || (Get_Front_FirstLearn_Flag() == 3))
{ {
if (FLASH_SYNC_1Hz) if (FLASH_SYNC_1Hz)
...@@ -2162,6 +2169,8 @@ void SEG_SET_TPMS_DISPLAY(uint8_t m_Flag, uint16_t m_NUM1, uint16_t m_NUM2, uint ...@@ -2162,6 +2169,8 @@ void SEG_SET_TPMS_DISPLAY(uint8_t m_Flag, uint16_t m_NUM1, uint16_t m_NUM2, uint
IC2_SEG118 = IC_SEG_ON; IC2_SEG118 = IC_SEG_ON;
} }
} }
}
else else
{ {
IC2_SEG109 = IC_SEG_ON; IC2_SEG109 = IC_SEG_ON;
......
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