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

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

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