Commit e0a36c2a authored by 陈家乐's avatar 陈家乐

:beetle: fix:55594 胎压外发最大值为100psi

parent 9f506bdf
......@@ -102,6 +102,8 @@ void Can_Set_Buff_450(canlib_uint8_t CopyData[])
{
CANMsg450Union *p450;
uint8_t i = 0;
uint16_t u16FrontTpms = 0;
uint16_t u16RearTpms = 0;
p450 = (CANMsg450Union *)CopyData;
if ( p450 != ( void * )0 )
......@@ -120,8 +122,16 @@ void Can_Set_Buff_450(canlib_uint8_t CopyData[])
}
else
{
p450 -> Sig.Front_Pressure_TX_H = ((Get_Front_TPMS_TX() + 146) >> 8) & 0xFF;
p450 -> Sig.Front_Pressure_TX_L = (Get_Front_TPMS_TX() + 146) & 0xFF;
if((Get_Front_TPMS_TX() + 146) <= 1000U)
{
u16FrontTpms = (Get_Front_TPMS_TX() + 146);
}
else
{
u16FrontTpms = 1000U;
}
p450 -> Sig.Front_Pressure_TX_H = ( u16FrontTpms >> 8) & 0xFF;
p450 -> Sig.Front_Pressure_TX_L = ( u16FrontTpms) & 0xFF;
}
if(Get_Rear_TPMS_Sig_Vaild() == 0\
|| Get_TPMS_Rear_Learn() != 2
......@@ -133,8 +143,16 @@ void Can_Set_Buff_450(canlib_uint8_t CopyData[])
}
else
{
p450 -> Sig.Rear_Pressure_TX_H = ((Get_Rear_TPMS_TX() + 146) >> 8) & 0xFF;
p450 -> Sig.Rear_Pressure_TX_L = (Get_Rear_TPMS_TX() + 146) & 0xFF;
if((Get_Rear_TPMS_TX() + 146) <= 1000U)
{
u16RearTpms = (Get_Rear_TPMS_TX() + 146);
}
else
{
u16RearTpms = 1000U;
}
p450 -> Sig.Rear_Pressure_TX_H = (u16RearTpms >> 8) & 0xFF;
p450 -> Sig.Rear_Pressure_TX_L = (u16RearTpms) & 0xFF;
}
}
......
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