Commit 96c0f7f6 authored by 李俭双's avatar 李俭双

🐞 fix:45350 Apparent: Dereference of NULL pointer.

parent 777d8d7a
...@@ -15,8 +15,10 @@ void Can_Set_Buff_220(canlib_uint8_t CopyData[]) ...@@ -15,8 +15,10 @@ void Can_Set_Buff_220(canlib_uint8_t CopyData[])
{ {
p220->Msg [ i ] = 0xFFu; p220->Msg [ i ] = 0xFFu;
} }
}
p220 -> Sig.TCS_TX = Get_Dis_Tcs_Val(); p220 -> Sig.TCS_TX = Get_Dis_Tcs_Val();
}
} }
void Can_Set_Buff_6EE(canlib_uint8_t CopyData[]) void Can_Set_Buff_6EE(canlib_uint8_t CopyData[])
{ {
...@@ -33,12 +35,22 @@ void Can_Set_Buff_6EE(canlib_uint8_t CopyData[]) ...@@ -33,12 +35,22 @@ void Can_Set_Buff_6EE(canlib_uint8_t CopyData[])
{ {
p6EE->Msg [ i ] = 0xFFu; p6EE->Msg [ i ] = 0xFFu;
} }
}
//p6EE -> Sig.Vsppe_H3_TX = (Vspeed_tx >> 8) & 0x7u ;
//p6EE -> Sig.Vsppe_L8_TX = Vspeed_tx & 0xFF ;
p6EE -> Sig.ODO_TX_H = (ODO_tx >> 16) & 0xFF ; p6EE -> Sig.ODO_TX_H = (ODO_tx >> 16) & 0xFF ;
p6EE -> Sig.ODO_TX_M = (ODO_tx >> 8) & 0xFF ; p6EE -> Sig.ODO_TX_M = (ODO_tx >> 8) & 0xFF ;
p6EE -> Sig.ODO_TX_L = ODO_tx & 0xFF ; p6EE -> Sig.ODO_TX_L = ODO_tx & 0xFF ;
if(Get_Fuel_RES() > 255)
{
p6EE -> Sig.Fuel_Res_TX = 0xFF ;
}
else
{
p6EE -> Sig.Fuel_Res_TX = Get_Fuel_RES() ;
}
}
//p6EE -> Sig.Vsppe_H3_TX = (Vspeed_tx >> 8) & 0x7u ;
//p6EE -> Sig.Vsppe_L8_TX = Vspeed_tx & 0xFF ;
// p6EE -> Sig.Uint_TX = Get_Dis_KM_Unit() ; // p6EE -> Sig.Uint_TX = Get_Dis_KM_Unit() ;
// p6EE -> Sig.Coolant_Seg_TX = GET_DataCoolantTempSegDisp() ; // p6EE -> Sig.Coolant_Seg_TX = GET_DataCoolantTempSegDisp() ;
//if (GET_DataCollantTempWarnflg() == 2) //if (GET_DataCollantTempWarnflg() == 2)
...@@ -50,14 +62,6 @@ void Can_Set_Buff_6EE(canlib_uint8_t CopyData[]) ...@@ -50,14 +62,6 @@ void Can_Set_Buff_6EE(canlib_uint8_t CopyData[])
// p6EE -> Sig.Coolant_Warn_TX = 0; // p6EE -> Sig.Coolant_Warn_TX = 0;
//} //}
//p6EE -> Sig.Fuel_Seg_TX = Get_CurFuelSetp() ; //p6EE -> Sig.Fuel_Seg_TX = Get_CurFuelSetp() ;
if(Get_Fuel_RES() > 255)
{
p6EE -> Sig.Fuel_Res_TX = 0xFF ;
}
else
{
p6EE -> Sig.Fuel_Res_TX = Get_Fuel_RES() ;
}
} }
...@@ -76,10 +80,11 @@ void Can_Set_Buff_6EF(canlib_uint8_t CopyData[]) ...@@ -76,10 +80,11 @@ void Can_Set_Buff_6EF(canlib_uint8_t CopyData[])
{ {
p6EF->Msg [ i ] = 0xFFu; p6EF->Msg [ i ] = 0xFFu;
} }
}
//p6EF -> Sig.Espeed_TX = Espeed_tx;
p6EF -> Sig.TripA_H = (TripA_tx >> 8) & 0xFF; p6EF -> Sig.TripA_H = (TripA_tx >> 8) & 0xFF;
p6EF -> Sig.TripA_L = TripA_tx & 0xFF; p6EF -> Sig.TripA_L = TripA_tx & 0xFF;
}
//p6EF -> Sig.Espeed_TX = Espeed_tx;
//p6EF -> Sig.Coolant_TX = GET_DataCoolantTempValueDisp() + 40; //p6EF -> Sig.Coolant_TX = GET_DataCoolantTempValueDisp() + 40;
} }
void Can_Set_Buff_450(canlib_uint8_t CopyData[]) void Can_Set_Buff_450(canlib_uint8_t CopyData[])
...@@ -94,11 +99,12 @@ void Can_Set_Buff_450(canlib_uint8_t CopyData[]) ...@@ -94,11 +99,12 @@ void Can_Set_Buff_450(canlib_uint8_t CopyData[])
{ {
p450->Msg [ i ] = 0xFFu; p450->Msg [ i ] = 0xFFu;
} }
}
p450 -> Sig.Front_Pressure_TX_H = (Get_Front_TPMS_TX() >> 8) & 0xFF; p450 -> Sig.Front_Pressure_TX_H = (Get_Front_TPMS_TX() >> 8) & 0xFF;
p450 -> Sig.Front_Pressure_TX_L = Get_Front_TPMS_TX() & 0xFF; p450 -> Sig.Front_Pressure_TX_L = Get_Front_TPMS_TX() & 0xFF;
p450 -> Sig.Rear_Pressure_TX_H = (Get_Rear_TPMS_TX() >> 8) & 0xFF; p450 -> Sig.Rear_Pressure_TX_H = (Get_Rear_TPMS_TX() >> 8) & 0xFF;
p450 -> Sig.Rear_Pressure_TX_L = Get_Rear_TPMS_TX() & 0xFF; p450 -> Sig.Rear_Pressure_TX_L = Get_Rear_TPMS_TX() & 0xFF;
}
} }
void Can_Set_Buff_580(canlib_uint8_t CopyData[]) void Can_Set_Buff_580(canlib_uint8_t CopyData[])
{ {
...@@ -112,7 +118,7 @@ void Can_Set_Buff_580(canlib_uint8_t CopyData[]) ...@@ -112,7 +118,7 @@ void Can_Set_Buff_580(canlib_uint8_t CopyData[])
{ {
p580->Msg [ i ] = 0xFFu; p580->Msg [ i ] = 0xFFu;
} }
}
if(Get_Tpms_TX_Flag() == 1) if(Get_Tpms_TX_Flag() == 1)
{ {
p580 -> Sig.TPMS_LEARN_CND_BYTE0 = 0x31; p580 -> Sig.TPMS_LEARN_CND_BYTE0 = 0x31;
...@@ -137,6 +143,8 @@ void Can_Set_Buff_580(canlib_uint8_t CopyData[]) ...@@ -137,6 +143,8 @@ void Can_Set_Buff_580(canlib_uint8_t CopyData[])
p580 -> Sig.TPMS_LEARN_CND_BYTE3 = 0x0; p580 -> Sig.TPMS_LEARN_CND_BYTE3 = 0x0;
p580 -> Sig.TPMS_LEARN_CND_BYTE4 = 0x02; p580 -> Sig.TPMS_LEARN_CND_BYTE4 = 0x02;
} }
}
} }
......
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