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

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

parent 1525e4dd
......@@ -158,7 +158,7 @@ void Can_Set_Buff_450(canlib_uint8_t CopyData[])
}
}
//uint8_t Can_580Send_flag = 0;
void Can_Set_Buff_580(canlib_uint8_t CopyData[])
{
CANMsg580Union *p580;
......@@ -174,33 +174,48 @@ 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;
}
//Can_580Send_flag = 1;
//if(CAN_TX_Count++ > 2)
//{
// Tpms_TX_Flag = 0;
// CAN_TX_Count = 0;
// //Can_580Send_flag = 0;
//}
p580 -> Sig.TPMS_LEARN_CND_BYTE0 = 0x31;
p580 -> Sig.TPMS_LEARN_CND_BYTE1 = 0x01;
p580 -> Sig.TPMS_LEARN_CND_BYTE2 = 0x59;
p580 -> Sig.TPMS_LEARN_CND_BYTE3 = 0x08;
p580 -> Sig.TPMS_LEARN_CND_BYTE4 = 0x00;
//if(Can_580Send_flag == 0)
//{
// Can_580Send_flag = 1;
// CAN_TX_Count++;
//}
}
else if(Get_Tpms_TX_Flag() == 2)
{
if(++CAN_TX_Count > 3)
{
Tpms_TX_Flag = 0;
CAN_TX_Count = 0;
}
//Can_580Send_flag = 1;
//if(CAN_TX_Count++ > 2)
//{
// Tpms_TX_Flag = 0;
// CAN_TX_Count = 0;
// //Can_580Send_flag = 0;
//}
p580 -> Sig.TPMS_LEARN_CND_BYTE0 = 0x31;
p580 -> Sig.TPMS_LEARN_CND_BYTE1 = 0x01;
p580 -> Sig.TPMS_LEARN_CND_BYTE2 = 0x59;
p580 -> Sig.TPMS_LEARN_CND_BYTE3 = 0x08;
p580 -> Sig.TPMS_LEARN_CND_BYTE4 = 0x01;
//if(Can_580Send_flag == 0)
//{
// Can_580Send_flag = 1;
// CAN_TX_Count++;
//}
}
else
{
CAN_TX_Count = 0;
//Can_580Send_flag = 0;
//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;
......
......@@ -326,7 +326,11 @@ uint8_t Get_Busoff_Status(void)
{
return get_can_busoff(CAN_CH_0);
}
extern uint8_t Can_341_Flg;
//extern uint8_t Can_341_Flg;
//extern uint8_t Can_580Send_flag;
uint8_t CAN_Send_Cound = 0;
extern uint8_t Tpms_TX_Flag;
uint8_t COM_APP_Process(st_CAN_Msg *Msg)
{
// Can_Write((st_CAN_Msg *)Msg);
......@@ -380,9 +384,19 @@ uint8_t COM_APP_Process(st_CAN_Msg *Msg)
#if (IC_Current == TY200_080000b_ty)
case 0x580:
if (Get_Tpms_TX_Flag() != 0)
{
if(CAN_Send_Cound++ <= 2)
{
CAN_result = CAN_Transmit(CAN0MSG14, &CAN_SendMsg);
}
else
{
CAN_Send_Cound = 0;
Tpms_TX_Flag = 0;
}
//Can_580Send_flag = 0;
}
break;
#endif
......
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