Commit 164f8179 authored by 陈家乐's avatar 陈家乐

🐞 fix:胎压学习外发改为三帧

parent 434a07db
......@@ -123,6 +123,12 @@ void Can_Set_Buff_450(canlib_uint8_t CopyData[])
}
}
uint16_t CAN_TX_Count;
extern uint8_t Tpms_TX_Flag;
void CAN_TX_Count_Init(void)
{
CAN_TX_Count = 0;
}
void Can_Set_Buff_580(canlib_uint8_t CopyData[])
{
CANMsg580Union *p580;
......@@ -138,6 +144,11 @@ void Can_Set_Buff_580(canlib_uint8_t CopyData[])
if(Get_Tpms_TX_Flag() == 1)
{
if(++CAN_TX_Count >= 3)
{
Tpms_TX_Flag = 0;
CAN_TX_Count = 0;
}
p580 -> Sig.TPMS_LEARN_CND_BYTE0 = 0x31;
p580 -> Sig.TPMS_LEARN_CND_BYTE1 = 0x01;
p580 -> Sig.TPMS_LEARN_CND_BYTE2 = 0x59;
......@@ -146,6 +157,11 @@ void Can_Set_Buff_580(canlib_uint8_t CopyData[])
}
else if(Get_Tpms_TX_Flag() == 2)
{
if(++CAN_TX_Count >= 3)
{
Tpms_TX_Flag = 0;
CAN_TX_Count = 0;
}
p580 -> Sig.TPMS_LEARN_CND_BYTE0 = 0x31;
p580 -> Sig.TPMS_LEARN_CND_BYTE1 = 0x01;
p580 -> Sig.TPMS_LEARN_CND_BYTE2 = 0x59;
......@@ -154,6 +170,7 @@ void Can_Set_Buff_580(canlib_uint8_t CopyData[])
}
else
{
CAN_TX_Count = 0;
p580 -> Sig.TPMS_LEARN_CND_BYTE0 = 0x0;
p580 -> Sig.TPMS_LEARN_CND_BYTE1 = 0x0;
p580 -> Sig.TPMS_LEARN_CND_BYTE2 = 0x0;
......
......@@ -93,6 +93,8 @@ static void Power_KL30_Init(void)
RTE_DEEPSLEEP_GPIO_Interrupt_Enable(WAKEUP_KL15_In,Trigger_Rising);
FaultCode_Init();
CAN_TX_Count_Init();
}
extern uint32_t PowerIgnOffTimeLine;
static void Power_Wakeup_Init(void)
......@@ -138,6 +140,8 @@ static void Power_Wakeup_Init(void)
Data_TPMS_KL15_WAKE_UP_Init();
RTE_DEEPSLEEP_GPIO_Interrupt_Enable(WAKEUP_KL15_In,Trigger_Rising);
FaultCode_Init();
CAN_TX_Count_Init();
}
static void Power_LVP_Init(void)
......
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