Commit 33fc13e2 authored by 陈家乐's avatar 陈家乐

🐞 fix:修改胎压显示,当识别到正确的胎压ID,按实际接收的胎压值常亮显示

parent 0dcd2258
......@@ -145,11 +145,12 @@ void Data_TPMS_Processing_Service ( void )
LearnTime_Count = 0;
if((Get_CAN_CH0_ID_373_Sig_Front_id() != 0) && (Get_CAN_CH0_ID_373_Sig_Front_id() != 0xFFFFFFFF))
{
TPMS.TPMS_Front_Learn = LearningCompletion;
TPMS.TPMS_Front_ID_Value = 1;
//TPMS.TPMS_Front_Learn = LearningCompletion;
}
else
{
;
TPMS.TPMS_Front_ID_Value = 0;
}
}
......@@ -231,11 +232,12 @@ void Data_TPMS_Processing_Service ( void )
LearnTime_Count1 = 0;
if((Get_CAN_CH0_ID_373_Sig_Rear_id() != 0) && (Get_CAN_CH0_ID_373_Sig_Rear_id() != 0xFFFFFFFF))
{
TPMS.TPMS_Rear_Learn = LearningCompletion;
TPMS.TPMS_Rear_ID_Value = 1;
//TPMS.TPMS_Rear_Learn = LearningCompletion;
}
else
{
;
TPMS.TPMS_Rear_ID_Value = 0;
}
}
......@@ -471,6 +473,15 @@ uint8_t Get_Rear_TPMS_Sig_Vaild (void)
{
return TPMS.Rear_TPMS_Valid;
}
uint8_t Get_Front_TPMS_ID_Vaild (void)
{
return TPMS.TPMS_Front_ID_Value;
}
uint8_t Get_Rear_TPMS_ID_Vaild (void)
{
return TPMS.TPMS_Rear_ID_Value;
}
//10倍
uint16_t Get_Front_TPMS_Sig_Value (void)
{
......
......@@ -18,6 +18,9 @@ typedef struct __attribute__((aligned(4)))
uint8_t TPMS_Front_Timeclean;
uint8_t TPMS_Rear_Timeclean;
uint8_t TPMS_Front_ID_Value;
uint8_t TPMS_Rear_ID_Value;
}_TPMS_Display;
typedef enum
......@@ -33,6 +36,8 @@ uint32_t Data_Bar_To_Psi (uint32_t bar);
uint8_t Get_Led_TPMS_Waring (void);
uint8_t Get_Front_TPMS_Sig_Vaild (void);
uint8_t Get_Rear_TPMS_Sig_Vaild (void);
uint8_t Get_Front_TPMS_ID_Vaild (void);
uint8_t Get_Rear_TPMS_ID_Vaild (void);
uint16_t Get_Front_TPMS_Sig_Value (void);
uint16_t Get_Rear_TPMS_Sig_Value (void);
uint16_t Get_Rear_TPMS_TX (void);
......
......@@ -2251,9 +2251,23 @@ void SEG_SET_TPMS_DISPLAY(uint8_t m_Flag, uint16_t m_NUM1, uint16_t m_NUM2, uint
}
else
{
SEG_SET_FRONT_TPMS_NUM(Get_Front_FirstLearn_Flag(), m_NUM1, m_valid1);
SEG_SET_Rear_TPMS_NUM(Get_Rear_FirstLearn_Flag(), m_NUM2, m_valid2);
if(Get_Front_TPMS_ID_Vaild() == 1)
{
SEG_SET_FRONT_TPMS_NUM(Get_Front_FirstLearn_Flag(), m_NUM1, m_valid1);
}
else
{
SEG_SET_FRONT_TPMS_NUM(LearningFailure, m_NUM1, m_valid1);
}
if(Get_Rear_TPMS_ID_Vaild() == 1)
{
SEG_SET_Rear_TPMS_NUM(Get_Rear_FirstLearn_Flag(), m_NUM2, m_valid2);
}
else
{
SEG_SET_Rear_TPMS_NUM(LearningFailure, m_NUM2, m_valid2);
}
}
......
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