Commit 95f45931 authored by 陈家乐's avatar 陈家乐

🐞 fix:更改EEPROM频繁读写问题

parent 5e6d34e4
......@@ -260,7 +260,14 @@ void Data_TPMS_Processing_Service ( void )
{
MenuData.TPMS_Rear_Learn = TPMS.TPMS_Rear_Learn;
}
if((TPMS.TPMS_Front_Learn == 0x2) || (TPMS.TPMS_Front_Learn == 0x3) || (TPMS.TPMS_Rear_Learn == 0x2) || (TPMS.TPMS_Rear_Learn == 0x3))
if(((TPMS.TPMS_Front_Learn == 0x2) || (TPMS.TPMS_Front_Learn == 0x3)) && (TPMS.TPMS_Front_Learn != MenuData.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))
{
TPMS_L[0] = MenuData.TPMS_Front_Learn;
TPMS_L[1] = MenuData.TPMS_Rear_Learn;
......@@ -300,8 +307,7 @@ void Data_TPMS_Processing_Service ( void )
{
TPMS.Rear_Press_Value = 9900;
}
//if(((TPMS.Rear_Press_Value + 50)< 1700) || ((TPMS.Rear_Press_Value + 50) > 2500))
if((Get_Rear_TPMS_Sig_Value() < 17) || (Get_Rear_TPMS_Sig_Value() > 25))
if(((TPMS.Rear_Press_Value + 50)< 1700) || ((TPMS.Rear_Press_Value + 50) > 2500))
{
TPMS.TPMS_Warning = 1;
}
......@@ -321,8 +327,7 @@ void Data_TPMS_Processing_Service ( void )
{
TPMS.Front_Press_Value = 9900;
}
//if(((TPMS.Front_Press_Value + 50) < 1700) || ((TPMS.Front_Press_Value + 50) > 2300))
if((Get_Front_TPMS_Sig_Value() < 17) || (Get_Front_TPMS_Sig_Value() > 23))
if(((TPMS.Front_Press_Value + 50) < 1700) || ((TPMS.Front_Press_Value + 50) > 2300))
{
TPMS.TPMS_Warning = 1;
}
......@@ -357,8 +362,7 @@ void Data_TPMS_Processing_Service ( void )
{
TPMS.Rear_Press_Value = 9900;
}
//if (((TPMS.Front_Press_Value + 50) < 1700) || ((TPMS.Front_Press_Value + 50) > 2300) || ((TPMS.Rear_Press_Value + 50) < 1700) || ((TPMS.Rear_Press_Value + 50) > 2500))
if ((Get_Front_TPMS_Sig_Value() < 17) || (Get_Front_TPMS_Sig_Value() > 23) || (Get_Rear_TPMS_Sig_Value() < 17) || (Get_Rear_TPMS_Sig_Value() > 25))
if (((TPMS.Front_Press_Value + 50) < 1700) || ((TPMS.Front_Press_Value + 50) > 2300) || ((TPMS.Rear_Press_Value + 50) < 1700) || ((TPMS.Rear_Press_Value + 50) > 2500))
{
TPMS.TPMS_Warning = 1;
}
......
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