Commit 4f0b5963 authored by 陈家乐's avatar 陈家乐

🐞 fix:修改频繁读写EEOROM的问题

parent a6b0aa3b
......@@ -260,14 +260,7 @@ 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_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))
if((TPMS.TPMS_Front_Learn == 0x2) || (TPMS.TPMS_Front_Learn == 0x3) || (TPMS.TPMS_Rear_Learn == 0x2) || (TPMS.TPMS_Rear_Learn == 0x3))
{
TPMS_L[0] = MenuData.TPMS_Front_Learn;
TPMS_L[1] = MenuData.TPMS_Rear_Learn;
......@@ -307,7 +300,8 @@ 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(((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))
{
TPMS.TPMS_Warning = 1;
}
......@@ -327,7 +321,8 @@ 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(((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))
{
TPMS.TPMS_Warning = 1;
}
......@@ -362,7 +357,8 @@ 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 (((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))
{
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