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

🐞 fix:62041 【天鹰TY200】ID220外发AliveCounter出现异常跳变,上大电心跳信号初始化两次。增加初始化条件

parent c4943fc8
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
uint16_t CAN_TX_Count = 0; uint16_t CAN_TX_Count = 0;
uint16_t AliveCountTimer = 0; uint16_t AliveCountTimer = 0;
uint8_t Power_KL30_Init_flag = 0; uint8_t Power_KL30_Init_flag = 0;
uint8_t AliveCount_KL30_ResettingFlag = 0;
extern uint8_t Tpms_TX_Flag; extern uint8_t Tpms_TX_Flag;
...@@ -18,7 +20,15 @@ void CAN_TX_Flag_Init(void) ...@@ -18,7 +20,15 @@ void CAN_TX_Flag_Init(void)
void CAN_TX_Count_Init(void) void CAN_TX_Count_Init(void)
{ {
CAN_TX_Count = 0; CAN_TX_Count = 0;
AliveCountTimer = 0; if(AliveCount_KL30_ResettingFlag > 0)
{
AliveCount_KL30_ResettingFlag = 0;
}
else
{
AliveCountTimer = 0;
}
} }
void Can_Set_Buff_220(canlib_uint8_t CopyData[]) void Can_Set_Buff_220(canlib_uint8_t CopyData[])
{ {
......
...@@ -44,6 +44,7 @@ void PwrMemInit(void) ...@@ -44,6 +44,7 @@ void PwrMemInit(void)
} }
extern uint8_t Power_KL30_Init_flag; extern uint8_t Power_KL30_Init_flag;
extern uint8_t AliveCount_KL30_ResettingFlag;
static void Power_KL30_Init(void) static void Power_KL30_Init(void)
{ {
CAN_TX_Flag_Init(); CAN_TX_Flag_Init();
...@@ -52,7 +53,7 @@ static void Power_KL30_Init(void) ...@@ -52,7 +53,7 @@ static void Power_KL30_Init(void)
Simulated_IIC_2_Init(); Simulated_IIC_2_Init();
eeprom_StoreInfo_Init(); eeprom_StoreInfo_Init();
Can_Init(); Can_Init();
Data_TPMS_KL30_Init (); Data_TPMS_KL30_Init ();
CAN_TX_Init(); CAN_TX_Init();
//CAN_TX_SetEnable(&CAN_CH0_CanMsgTxOp, CAN_N_TX_Enable); //CAN_TX_SetEnable(&CAN_CH0_CanMsgTxOp, CAN_N_TX_Enable);
...@@ -102,7 +103,7 @@ static void Power_KL30_Init(void) ...@@ -102,7 +103,7 @@ static void Power_KL30_Init(void)
Common_DataInit(); Common_DataInit();
Power_KL30_Init_flag = 1; Power_KL30_Init_flag = 1;
AliveCount_KL30_ResettingFlag = 1;
} }
extern uint32_t PowerIgnOffTimeLine; extern uint32_t PowerIgnOffTimeLine;
static void Power_Wakeup_Init(void) static void Power_Wakeup_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