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

🐞 fix:依据车厂要求,取消胎压单位转换,更改相关代码

parent 9639b3b6
......@@ -18,7 +18,7 @@ void Data_TPMS_KL30_Init ( void )
TPMS.Front_TPMS_Valid = 0;
TPMS.Rear_TPMS_Valid = 0;
TPMS.TPMS_Warning = 0;
TPMS.TPMS_Unit = Get_Dis_Tpms_Unit();
//TPMS.TPMS_Unit = Get_Dis_Tpms_Unit();
TPMS.TPMS_Front_Learn = MenuData.TPMS_Front_Learn;
TPMS.TPMS_Rear_Learn = MenuData.TPMS_Rear_Learn;
TPMS.TPMS_Front_FirstLearn_Flag = MenuData.TPMS_Front_FirstLearn_Flag;
......@@ -269,7 +269,7 @@ void Data_TPMS_Processing_Service ( void )
}
TPMS.TPMS_Unit = Get_Dis_Tpms_Unit();
//TPMS.TPMS_Unit = Get_Dis_Tpms_Unit();
Front_TPMS = Get_CAN_CH0_ID_341_Sig_Front_Pressure();
Rear_TPMS = Get_CAN_CH0_ID_341_Sig_Rear_Pressure();
......@@ -457,15 +457,15 @@ uint8_t Get_Rear_TPMS_Sig_Vaild (void)
uint16_t Get_Front_TPMS_Sig_Value (void)
{
uint16_t value = 0;
if (TPMS.TPMS_Unit == 1)
{
value = (Data_Bar_To_Psi(TPMS.Front_Press_Value) + 500) / 1000;
if(value > 99)
{
value = 99;
}
}
else
//if (TPMS.TPMS_Unit == 1)
//{
// value = (Data_Bar_To_Psi(TPMS.Front_Press_Value) + 500) / 1000;
// if(value > 99)
// {
// value = 99;
// }
//}
//else
{
value = TPMS.Front_Press_Value + 50;
value = value / 100;
......@@ -475,16 +475,16 @@ uint16_t Get_Front_TPMS_Sig_Value (void)
uint16_t Get_Rear_TPMS_Sig_Value (void)
{
uint16_t value = 0;
if (TPMS.TPMS_Unit == 1)
{
value = (Data_Bar_To_Psi(TPMS.Rear_Press_Value) + 500) / 1000;
if(value > 99)
{
value = 99;
}
}
else
//if (TPMS.TPMS_Unit == 1)
//{
// value = (Data_Bar_To_Psi(TPMS.Rear_Press_Value) + 500) / 1000;
// if(value > 99)
// {
// value = 99;
// }
//
//}
//else
{
value = TPMS.Rear_Press_Value + 50;
value = value / 100;
......
......@@ -122,7 +122,7 @@ void Gauge_Service(void)
SEG_SET_CoolantDial(1, GET_DataCoolantTempSegDisp(), GET_DataCoolantTempValueDisp(), GET_DataCollantTempSegValid());
SEG_SET_Voltage_NUM(1, Get_Battery_Voltage());
#if(IC_Current == TY200_080000b_ty)
SEG_SET_TPMS_DISPLAY(1, Get_Front_TPMS_Sig_Value(), Get_Rear_TPMS_Sig_Value(), Get_Dis_Tpms_Unit(),Get_Front_TPMS_Sig_Vaild(), Get_Rear_TPMS_Sig_Vaild());
SEG_SET_TPMS_DISPLAY(1, Get_Front_TPMS_Sig_Value(), Get_Rear_TPMS_Sig_Value(), 0 ,Get_Front_TPMS_Sig_Vaild(), Get_Rear_TPMS_Sig_Vaild());
#endif
SEG_SET_Navigation_STS(Get_Navigation_St_Dis(),Get_Navigation_Code_Dis(),Get_Navigation_Mileage_Dis());
......
......@@ -2089,40 +2089,40 @@ void SEG_SET_TPMS_DISPLAY(uint8_t m_Flag, uint16_t m_NUM1, uint16_t m_NUM2, uint
IC2_SEG122 = IC_SEG_ON;
if ((ClearODO_Flag != 1) && (Common_GetIgnOnTime() >= 3000))
{
if (Get_Current_PageType() == Page_Tpms_Unit)
{
if (m_Unit == 0)
{
IC2_SEG118 = IC_SEG_ON;
IC2_SEG138 = IC_SEG_ON;
if (FLASH_SYNC_1Hz)
{
IC2_SEG109 = IC_SEG_OFF;
IC2_SEG110 = IC_SEG_ON;
}
else
{
IC2_SEG109 = IC_SEG_OFF;
IC2_SEG110 = IC_SEG_OFF;
}
}
else
{
IC2_SEG118 = IC_SEG_OFF;
IC2_SEG138 = IC_SEG_OFF;
if (FLASH_SYNC_1Hz)
{
IC2_SEG109 = IC_SEG_ON;
IC2_SEG110 = IC_SEG_OFF;
}
else
{
IC2_SEG109 = IC_SEG_OFF;
IC2_SEG110 = IC_SEG_OFF;
}
}
}
else
//if (Get_Current_PageType() == Page_Tpms_Unit)
//{
// if (m_Unit == 0)
// {
// IC2_SEG118 = IC_SEG_ON;
// IC2_SEG138 = IC_SEG_ON;
// if (FLASH_SYNC_1Hz)
// {
// IC2_SEG109 = IC_SEG_OFF;
// IC2_SEG110 = IC_SEG_ON;
// }
// else
// {
// IC2_SEG109 = IC_SEG_OFF;
// IC2_SEG110 = IC_SEG_OFF;
// }
// }
// else
// {
// IC2_SEG118 = IC_SEG_OFF;
// IC2_SEG138 = IC_SEG_OFF;
// if (FLASH_SYNC_1Hz)
// {
// IC2_SEG109 = IC_SEG_ON;
// IC2_SEG110 = IC_SEG_OFF;
// }
// else
// {
// IC2_SEG109 = IC_SEG_OFF;
// IC2_SEG110 = IC_SEG_OFF;
// }
// }
//}
//else
{
if (m_Unit == 0)
......@@ -2173,12 +2173,43 @@ void SEG_SET_TPMS_DISPLAY(uint8_t m_Flag, uint16_t m_NUM1, uint16_t m_NUM2, uint
}
if(Get_TPMS_CAN_LOST() == 0)
{
if (Get_Current_PageType() == Page_Front_Tpms)
{
if(FLASH_SYNC_1Hz)
{
IC2_SEG140 = IC_SEG_ON;
IC2_SEG133 = IC_SEG_ON;
}
else
{
IC2_SEG140 = IC_SEG_OFF;
IC2_SEG133 = IC_SEG_OFF;
}
IC2_SEG120 = IC_SEG_ON;
IC2_SEG113 = IC_SEG_ON;
}
else if (Get_Current_PageType() == Page_Rear_Tpms)
{
if(FLASH_SYNC_1Hz)
{
IC2_SEG120 = IC_SEG_ON;
IC2_SEG113 = IC_SEG_ON;
}
else
{
IC2_SEG120 = IC_SEG_OFF;
IC2_SEG113 = IC_SEG_OFF;
}
IC2_SEG140 = IC_SEG_ON;
IC2_SEG133 = IC_SEG_ON;
}
else
{
IC2_SEG120 = IC_SEG_ON;
IC2_SEG113 = IC_SEG_ON;
IC2_SEG140 = IC_SEG_ON;
IC2_SEG133 = IC_SEG_ON;
}
IC2_SEG143 = IC_SEG_OFF;
IC2_SEG141 = IC_SEG_OFF;
......
......@@ -296,18 +296,18 @@ void Key_Left_Short_Press(void)
Unit_Convert_Service();
}
#if (IC_Current == TY200_080000b_ty)
else if(PageType == Page_Tpms_Unit)
{
if(Get_Dis_Tpms_Unit() == 0)
{
MenuData.Tpms_Unit = 1;//psi
}
else
{
MenuData.Tpms_Unit = 0;//bar
}
Unit_Convert_Service();
}
//else if(PageType == Page_Tpms_Unit)
//{
// if(Get_Dis_Tpms_Unit() == 0)
// {
// MenuData.Tpms_Unit = 1;//psi
// }
// else
// {
// MenuData.Tpms_Unit = 0;//bar
// }
// Unit_Convert_Service();
//}
else if(PageType == Page_Front_Tpms)
{
PageType = Page_Rear_Tpms;
......@@ -386,12 +386,13 @@ void Key_Left_Long_Press(void)
#if (IC_Current == TY200_080000b_ty)
else if(PageType == Page_Km_Unit)
{
PageType = Page_Tpms_Unit;
}
else if(PageType == Page_Tpms_Unit)
{
//PageType = Page_Tpms_Unit;
PageType = Page_Front_Tpms;
}
//else if(PageType == Page_Tpms_Unit)
//{
// PageType = Page_Front_Tpms;
//}
else if((PageType == Page_Front_Tpms) || (PageType == Page_Rear_Tpms))
{
PageType = Page_Menu;
......@@ -466,7 +467,7 @@ void MenuData_Unit_Init(void)
uint32_t TCS[1] = {0};
Data_User_EEPROM_Read(EM_MenuData_Tcs_Val, TCS, 1u);
MenuData.KM_Unit = 0;
MenuData.Tpms_Unit = 0;
//MenuData.Tpms_Unit = 0;
MenuData.Tcs_Val = TCS[0];
}
......@@ -537,7 +538,8 @@ uint8_t Get_Dis_KM_Unit(void)
uint8_t Get_Dis_Tpms_Unit(void)
{
return MenuData.Tpms_Unit; //0bar,1psi
//return MenuData.Tpms_Unit; //0bar,1psi
return 0;
}
uint8_t Get_Dis_Tcs_Val(void)
......
......@@ -41,7 +41,7 @@ static void LED_Tire_Pressure_Execution(Tellib_uint16_t led_status);
//static void LED_Navigato_Execution(Tellib_uint16_t led_status);
Led_HighBeam_Count HighBeam_Timer;
//Led_HighBeam_Count HighBeam_Timer;
Tellib_uint16_t LED_Battery_Voltage = 0;
Tellib_uint16_t Battery_Voltage_valid = 0;
const LED_Attribute_st LED_Attribute [ LED_Max ] = {
......
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