Commit 4d0df89d authored by 高士达's avatar 高士达

Merge branch 'shihao' into 'develop'

Shihao

See merge request !25
parents 3cf1c59a 3d2498bd
...@@ -34,23 +34,23 @@ void Data_AvgFuel_A_KL30_Init ( void )// ...@@ -34,23 +34,23 @@ void Data_AvgFuel_A_KL30_Init ( void )//
void CAN_18FEF200_Receive(canlib_uint8_t CopyData []) void CAN_18FEF200_Receive(void)
{ {
g_aveFuel.Flg_18FEF200 = 1; g_aveFuel.Flg_18FEF200 = 1;
Data_InsFuel.Flg_18FEF200 = 1; Data_InsFuel.Flg_18FEF200 = 1;
FuelMeter.Flg_18FEF200 = 1; FuelMeter.Flg_18FEF200 = 1;
Data_Fuel_Consumption_Count_ISR(CopyData); //Data_Fuel_Consumption_Count_ISR(CopyData);
} }
uint32_t InsFuel_Cons = 0; uint32_t InsFuel_Cons = 0;
uint16_t FuelRate = 0; uint16_t FuelRate = 0;
void Data_Fuel_Consumption_Count_ISR(canlib_uint8_t CopyData [] )//100ms uint32_t FuelRate_Cons = 0;
uint16_t InsFuelRate = 0;
void Data_Fuel_Consumption_Count_ISR(void)//100ms
{ {
uint32_t FuelRate_Cons = 0; //FuelRate = ((uint16_t)CopyData [1]<< 8u)|CopyData [0];
uint16_t InsFuelRate = 0; FuelRate = Get_CAN_CH0_ID_18FEF200_Sig_EngFuelRate();
FuelRate = ((uint16_t)CopyData [1]<< 8u)|CopyData [0];
if(FuelRate < 0xFFFF) if(FuelRate < 0xFFFF)
{ {
...@@ -83,7 +83,7 @@ void Data_Fuel_Consumption_Count_ISR(canlib_uint8_t CopyData [] )//100ms ...@@ -83,7 +83,7 @@ void Data_Fuel_Consumption_Count_ISR(canlib_uint8_t CopyData [] )//100ms
if(Fuel_Remainder >= 900) if(Fuel_Remainder >= 900)
{ {
Fuel_Remainder = 0 ; Fuel_Remainder = 0;
} }
FuelRate_Cons++; FuelRate_Cons++;
} }
...@@ -94,7 +94,7 @@ void Data_Fuel_Consumption_Count_ISR(canlib_uint8_t CopyData [] )//100ms ...@@ -94,7 +94,7 @@ void Data_Fuel_Consumption_Count_ISR(canlib_uint8_t CopyData [] )//100ms
{ {
if(g_aveFuel.RateSum < 0x7FFFFFFF) if(g_aveFuel.RateSum < 0x7FFFFFFF)
{ {
g_aveFuel.RateSum += FuelRate_Cons;//add100ms 100p UL g_aveFuel.RateSum = FuelRate_Cons;//add100ms 100p UL
} }
else else
{ {
...@@ -157,7 +157,7 @@ void Data_AvgFuel_Processing_Service (void) ...@@ -157,7 +157,7 @@ void Data_AvgFuel_Processing_Service (void)
if(g_aveFuel.ValueA > 199) if(g_aveFuel.ValueA > 199)
{ {
g_aveFuel.ValueA = 199 ; g_aveFuel.ValueA = 199;
} }
g_aveFuel.ValueA_Last = g_aveFuel.ValueA; g_aveFuel.ValueA_Last = g_aveFuel.ValueA;
} }
......
...@@ -61,7 +61,7 @@ uint32_t GET_AvgFuel_ConsOf100msUL_Value(void); ...@@ -61,7 +61,7 @@ uint32_t GET_AvgFuel_ConsOf100msUL_Value(void);
void AvgFuel_ConsOf100msUL_Set(uint16_t FuelCons); void AvgFuel_ConsOf100msUL_Set(uint16_t FuelCons);
void Data_Fuel_Consumption_Count_ISR(canlib_uint8_t CopyData []); void Data_Fuel_Consumption_Count_ISR(void);
void Data_AvgFuel_TripA_Clear(void); void Data_AvgFuel_TripA_Clear(void);
...@@ -72,7 +72,7 @@ uint8_t GET_AvgFuel_TripA_500_Valid(void); ...@@ -72,7 +72,7 @@ uint8_t GET_AvgFuel_TripA_500_Valid(void);
uint16_t GET_AvgFuel_TripA_Value_Dis(void); uint16_t GET_AvgFuel_TripA_Value_Dis(void);
void CAN_18FEF200_Receive(canlib_uint8_t CopyData []); void CAN_18FEF200_Receive(void);
void CAN_2C0_Receive(void); void CAN_2C0_Receive(void);
void Can_AvgFuel_KL30_WakeUp_Init(void); void Can_AvgFuel_KL30_WakeUp_Init(void);
......
...@@ -1014,7 +1014,7 @@ void Gui_InstantOilCon(uint8_t Valid, uint8_t InstantOilCon) ...@@ -1014,7 +1014,7 @@ void Gui_InstantOilCon(uint8_t Valid, uint8_t InstantOilCon)
{ {
if ( InstantOilCon > 99 ) if ( InstantOilCon > 99 )
{ {
if ( DataVSpeed >= 500 ) if ( DataVSpeed >= 50 )
{ {
Draw_Image_Local_Digit_Draw(InstantOilCon, Number_18_white_List, 3, 1, InstantOilCon22Digits18PosX, 171); Draw_Image_Local_Digit_Draw(InstantOilCon, Number_18_white_List, 3, 1, InstantOilCon22Digits18PosX, 171);
Draw_Image_Local(( uint8_t * )ECU_Unit_Lkm_01_X0_Y0, 102, 171); Draw_Image_Local(( uint8_t * )ECU_Unit_Lkm_01_X0_Y0, 102, 171);
...@@ -1029,7 +1029,7 @@ void Gui_InstantOilCon(uint8_t Valid, uint8_t InstantOilCon) ...@@ -1029,7 +1029,7 @@ void Gui_InstantOilCon(uint8_t Valid, uint8_t InstantOilCon)
} }
else else
{ {
if ( DataVSpeed >= 500 ) if ( DataVSpeed >= 50 )
{ {
Draw_Image_Local_Digit_Draw(InstantOilCon, Number_18_white_List, 2, 0, InstantOilCon11Digits18PosX, 171); Draw_Image_Local_Digit_Draw(InstantOilCon, Number_18_white_List, 2, 0, InstantOilCon11Digits18PosX, 171);
Draw_Image_Local(( uint8_t * )ECU_Unit_Lkm_01_X0_Y0, 97, 171); Draw_Image_Local(( uint8_t * )ECU_Unit_Lkm_01_X0_Y0, 97, 171);
......
...@@ -125,7 +125,7 @@ void GET_Data_For_YB(void) ...@@ -125,7 +125,7 @@ void GET_Data_For_YB(void)
MinAFCPara.Speed = Common_Get_Act_V_Speed(); MinAFCPara.Speed = Common_Get_Act_V_Speed();
MinAFCPara.RPM = Get_DispEngineSpeed(); MinAFCPara.RPM = Get_DispEngineSpeed();
MinAFCPara.CurODO = Mile_Get_Index_Value(MILE_INDEX_ODO)*100; MinAFCPara.CurODO = Mile_Get_Index_Value(MILE_INDEX_ODO)*100;
if(GET_AvgFuel_ConsOf100msUL_Value()>= 65335) if(GET_AvgFuel_ConsOf100msUL_Value()>= 65535)
{ {
MinAFCPara.FuleConsume = 65535; MinAFCPara.FuleConsume = 65535;
} }
......
...@@ -117,7 +117,6 @@ void Sys_Run_Mode_10ms_Tasks_Group(void) ...@@ -117,7 +117,6 @@ void Sys_Run_Mode_10ms_Tasks_Group(void)
Line_In_Debounce_Service(10u); Line_In_Debounce_Service(10u);
Data_Engine_Speed_Processing_Service(); Data_Engine_Speed_Processing_Service();
Sound_Alarm_Trigger_TURN(); Sound_Alarm_Trigger_TURN();
AFCTimerCall();
//Can_BusOff_Fun( ); //Can_BusOff_Fun( );
...@@ -162,6 +161,7 @@ void Sys_Run_Mode_50ms_Tasks_Group(void) ...@@ -162,6 +161,7 @@ void Sys_Run_Mode_50ms_Tasks_Group(void)
void Sys_Run_Mode_100ms_Tasks_Group(void) void Sys_Run_Mode_100ms_Tasks_Group(void)
{ {
Data_Fuel_Consumption_Count_ISR();
TPMS_Tyre_Lost(); TPMS_Tyre_Lost();
LED_Driver_Refresh_Example(); LED_Driver_Refresh_Example();
PoMa_Sleep_Delay_Time_Handle(); PoMa_Sleep_Delay_Time_Handle();
......
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