Commit e16ffa4d authored by 高士达's avatar 高士达

Merge branch 'shihao' into 'develop'

Shihao

See merge request !26
parents 4d0df89d 184f1c56
......@@ -1067,11 +1067,27 @@ void Data_Instantaneous_Fuel_Display_Service(void)
{
if(Data_InsFuel.Valid)
{
//if(Data_InsFuel.Value_Last != Data_InsFuel.Value)
//{
// Data_InsFuel.FreshTime = 0;
// Data_InsFuel.Value_Last = Data_InsFuel.Value;
//}
if(Data_InsFuel.Value_Last != Data_InsFuel.Value)
{
Data_InsFuel.FreshTime = 0;
Data_InsFuel.Value_Last = Data_InsFuel.Value;
}
if(Data_InsFuel.V_Speed_backup != Common_Get_Act_V_Speed( ))
{
if((Common_Get_Act_V_Speed( ) >= 50)&&(Data_InsFuel.V_Speed_backup < 50))
{
Data_InsFuel.FreshTime = 0;
Data_InsFuel.Display_Flag = 1;
}
if((Common_Get_Act_V_Speed( ) < 50)&&(Data_InsFuel.V_Speed_backup >= 50))
{
Data_InsFuel.FreshTime = 0;
Data_InsFuel.Display_Flag = 0;
}
Data_InsFuel.V_Speed_backup = Common_Get_Act_V_Speed( );
}
Data_InsFuel.FreshTime++;
if(Data_InsFuel.FreshTime >= 20)//2s
......@@ -1080,7 +1096,7 @@ void Data_Instantaneous_Fuel_Display_Service(void)
Data_InsFuel.Display_Value = Data_InsFuel.Value;//100p
Data_InsFuel.Display_Value /= 10;//10p
Data_InsFuel.Display_Unit = Data_InsFuel.Display_Flag;
}
......
......@@ -1014,7 +1014,7 @@ void Gui_InstantOilCon(uint8_t Valid, uint8_t InstantOilCon)
{
if ( InstantOilCon > 99 )
{
if ( DataVSpeed >= 50 )
if ( Data_InsFuel.Display_Unit == 1 )
{
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);
......@@ -1029,7 +1029,7 @@ void Gui_InstantOilCon(uint8_t Valid, uint8_t InstantOilCon)
}
else
{
if ( DataVSpeed >= 50 )
if ( Data_InsFuel.Display_Unit == 1 )
{
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);
......
......@@ -222,6 +222,9 @@ typedef struct
uint32_t RateSum;
uint8_t Flg_18FEF200;
uint32_t Value_Last;
uint16_t V_Speed_backup;
uint8_t Display_Flag;
uint8_t Display_Unit;
}_Data_InsFuel_Struct;
extern _Data_InsFuel_Struct Data_InsFuel;
#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