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

🐞 fix:禅道外发问题:62025、61997、61907,数据处理完之前外发无效值

parent 1cd7f1c4
......@@ -4,7 +4,17 @@
uint16_t CAN_TX_Count = 0;
uint16_t AliveCountTimer = 0;
uint8_t Power_KL30_Init_flag = 0;
extern uint8_t Tpms_TX_Flag;
#define INVALID_VALUE 0x0
void CAN_TX_Flag_Init(void)
{
Power_KL30_Init_flag = 0;
}
void CAN_TX_Count_Init(void)
{
CAN_TX_Count = 0;
......@@ -45,6 +55,8 @@ void Can_Set_Buff_6EE(canlib_uint8_t CopyData[])
p6EE = (CANMsg6EEUnion *)CopyData;
if ( p6EE != ( void * )0 )
{
if(Power_KL30_Init_flag == 1)
{
for ( i = 0u; i < 8u; i++ )
{
......@@ -61,6 +73,15 @@ void Can_Set_Buff_6EE(canlib_uint8_t CopyData[])
{
p6EE -> Sig.Fuel_Res_TX = Fuel_tx ;
}
}
else
{
for ( i = 0u; i < 8u; i++ )
{
p6EE->Msg [ i ] = INVALID_VALUE;
}
}
}
//p6EE -> Sig.Vsppe_H3_TX = (Vspeed_tx >> 8) & 0x7u ;
......@@ -90,6 +111,8 @@ void Can_Set_Buff_6EF(canlib_uint8_t CopyData[])
TripA_tx = (uint16_t)Data_Read_Trip(EM_TRIP_A);
p6EF = (CANMsg6EFUnion *)CopyData;
if ( p6EF != ( void * )0 )
{
if(Power_KL30_Init_flag == 1)
{
for ( i = 0u; i < 8u; i++ )
{
......@@ -98,6 +121,15 @@ void Can_Set_Buff_6EF(canlib_uint8_t CopyData[])
p6EF -> Sig.TripA_H = (TripA_tx >> 8) & 0xFF;
p6EF -> Sig.TripA_L = TripA_tx & 0xFF;
}
else
{
for ( i = 0u; i < 8u; i++ )
{
p6EF->Msg [ i ] = INVALID_VALUE;
}
}
}
//p6EF -> Sig.Espeed_TX = Espeed_tx;
//p6EF -> Sig.Coolant_TX = GET_DataCoolantTempValueDisp() + 40;
......@@ -114,6 +146,8 @@ void Can_Set_Buff_450(canlib_uint8_t CopyData[])
p450 = (CANMsg450Union *)CopyData;
if ( p450 != ( void * )0 )
{
if(Power_KL30_Init_flag == 1)
{
for ( i = 0u; i < 8u; i++ )
{
......@@ -161,6 +195,15 @@ void Can_Set_Buff_450(canlib_uint8_t CopyData[])
p450 -> Sig.Rear_Pressure_TX_H = (u16RearTpms >> 8) & 0xFF;
p450 -> Sig.Rear_Pressure_TX_L = (u16RearTpms) & 0xFF;
}
}
else
{
for ( i = 0u; i < 8u; i++ )
{
p450->Msg [ i ] = INVALID_VALUE;
}
}
}
......
......@@ -23,6 +23,7 @@ static Power_Status_em Power_Stay_Sleep(void);
extern uint8_t u8LEDDriverCheckCount;
static const st_PowerGroup g_stPwrTasks = {
Power_KL30_Init,
Power_IG_OFF_Init,
......@@ -42,8 +43,10 @@ void PwrMemInit(void)
PowerMemInit(&g_stPwrTasks);
}
extern uint8_t Power_KL30_Init_flag;
static void Power_KL30_Init(void)
{
CAN_TX_Flag_Init();
ClearODO_Flag = 0;
Gpio_Init(Gpio_KL30_Init);
Simulated_IIC_2_Init();
......@@ -98,6 +101,8 @@ static void Power_KL30_Init(void)
// Data_TPMS_Processing_Service();
Common_DataInit();
Power_KL30_Init_flag = 1;
}
extern uint32_t PowerIgnOffTimeLine;
static void Power_Wakeup_Init(void)
......@@ -350,5 +355,5 @@ void Sys_Startup_Init(void)
uint8_t u8StartuoMode = 0;
PwrMemInit( );
Power_Management_Init(u8StartuoMode);
}
}
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