Commit 787e1778 authored by 李俭双's avatar 李俭双

🐞 fix:更改水温上电和无效到有效情况立即指示到位

parent c0c740ea
......@@ -286,14 +286,16 @@ void Data_Coolant_Temp_Display ( void )
DataCoolantTemp_Dis.u8_DownFlashtimer = DataCoolantTemp_Dis.u8_Downtimer;
DataCoolantTemp_Dis.u8_CurSeg = 0;
DataCoolantTemp_Dis.u8_DestSeg = 0 ;
DataCoolantTemp_Dis.u8_Flg = 0;
DataCoolantTemp_Dis.u8_Flg = 0;
u32ColCurNum = DataCoolantTemp.Value * 100 ;
DataCoolantTemp_Dis.u8_Holdtimer = CoolantFlashtimer;
}
else
{
DataCoolantTemp_Dis.Dis_Valid = 1;
if (DataCoolantTemp_Dis.u8_Flg == 2)
{
DataCoolantTemp_Dis.u8_Flg = 1;
DataCoolantTemp_Dis.u8_Flg = 1;
DataCoolantTemp_Dis.u8_UpFlashtimer = 0;
DataCoolantTemp_Dis.u8_DownFlashtimer = 0;
}
......@@ -303,6 +305,8 @@ void Data_Coolant_Temp_Display ( void )
DataCoolantTemp_Dis.u8_CurSeg = DataCoolantTemp_Dis.u8_DestSeg;
DataCoolantTemp_Dis.u8_UpFlashtimer = DataCoolantTemp_Dis.u8_Uptimer;
DataCoolantTemp_Dis.u8_DownFlashtimer = DataCoolantTemp_Dis.u8_Downtimer;
u32ColCurNum = DataCoolantTemp.Value * 100;
DataCoolantTemp_Dis.u8_Holdtimer = CoolantFlashtimer;
}
else
{
......@@ -311,44 +315,56 @@ void Data_Coolant_Temp_Display ( void )
}
}
if(DataCoolantTemp_Dis.u8_CurSeg > DataCoolantTemp_Dis.u8_DestSeg )
if (Common_GetIgnOnTime() >= 3030)
{
u32ColCurNum = Data_Coolant_Cal_Num(DataCoolantTemp_Dis.u8_CurSeg, 0, (DataCoolantTemp_Dis.u8_Downtimer - DataCoolantTemp_Dis.u8_DownFlashtimer), u32ColCurNum, DataCoolantTemp.Value*100);
DataCoolantTemp_Dis.u8_UpFlashtimer = 0;
DataCoolantTemp_Dis.u8_Holdtimer = 0;
DataCoolantTemp_Dis.u8_DownFlashtimer++;
if(DataCoolantTemp_Dis.u8_DownFlashtimer >= DataCoolantTemp_Dis.u8_Downtimer)
if(DataCoolantTemp_Dis.u8_CurSeg > DataCoolantTemp_Dis.u8_DestSeg )
{
u32ColCurNum = Data_Coolant_Cal_Num(DataCoolantTemp_Dis.u8_CurSeg, 0, (DataCoolantTemp_Dis.u8_Downtimer - DataCoolantTemp_Dis.u8_DownFlashtimer), u32ColCurNum, DataCoolantTemp.Value*100);
DataCoolantTemp_Dis.u8_UpFlashtimer = 0;
DataCoolantTemp_Dis.u8_Holdtimer = 0;
DataCoolantTemp_Dis.u8_DownFlashtimer++;
if(DataCoolantTemp_Dis.u8_DownFlashtimer >= DataCoolantTemp_Dis.u8_Downtimer)
{
DataCoolantTemp_Dis.u8_DownFlashtimer = 0;
DataCoolantTemp_Dis.u8_CurSeg--;
}
}
else if (DataCoolantTemp_Dis.u8_CurSeg < DataCoolantTemp_Dis.u8_DestSeg)
{
u32ColCurNum = Data_Coolant_Cal_Num(DataCoolantTemp_Dis.u8_CurSeg, 1, (DataCoolantTemp_Dis.u8_Uptimer - DataCoolantTemp_Dis.u8_UpFlashtimer), u32ColCurNum, DataCoolantTemp.Value*100);
DataCoolantTemp_Dis.u8_DownFlashtimer = 0;
DataCoolantTemp_Dis.u8_CurSeg--;
DataCoolantTemp_Dis.u8_Holdtimer = 0;
DataCoolantTemp_Dis.u8_UpFlashtimer++;
if (DataCoolantTemp_Dis.u8_UpFlashtimer >= DataCoolantTemp_Dis.u8_Uptimer)
{
DataCoolantTemp_Dis.u8_UpFlashtimer = 0;
DataCoolantTemp_Dis.u8_CurSeg++;
}
}
}
else if (DataCoolantTemp_Dis.u8_CurSeg < DataCoolantTemp_Dis.u8_DestSeg)
{
u32ColCurNum = Data_Coolant_Cal_Num(DataCoolantTemp_Dis.u8_CurSeg, 1, (DataCoolantTemp_Dis.u8_Uptimer - DataCoolantTemp_Dis.u8_UpFlashtimer), u32ColCurNum, DataCoolantTemp.Value*100);
DataCoolantTemp_Dis.u8_DownFlashtimer = 0;
DataCoolantTemp_Dis.u8_Holdtimer = 0;
DataCoolantTemp_Dis.u8_UpFlashtimer++;
if (DataCoolantTemp_Dis.u8_UpFlashtimer >= DataCoolantTemp_Dis.u8_Uptimer)
else
{
DataCoolantTemp_Dis.u8_DownFlashtimer = 0;
DataCoolantTemp_Dis.u8_UpFlashtimer = 0;
DataCoolantTemp_Dis.u8_CurSeg++;
DataCoolantTemp_Dis.u8_Holdtimer++;
if (DataCoolantTemp_Dis.u8_Holdtimer >= CoolantFlashtimer)
{
DataCoolantTemp_Dis.u8_Holdtimer = CoolantFlashtimer;
}
/*目标格和当前格一致时,数显如何处理*/
/*5S后更新为目标数值*/
u32ColCurNum = Data_Coolant_Cal_Num(DataCoolantTemp_Dis.u8_CurSeg, 2, (CoolantFlashtimer-DataCoolantTemp_Dis.u8_Holdtimer ), u32ColCurNum, DataCoolantTemp.Value*100);
}
}
else
{
DataCoolantTemp_Dis.u8_DownFlashtimer = 0;
DataCoolantTemp_Dis.u8_UpFlashtimer = 0;
DataCoolantTemp_Dis.u8_Holdtimer++;
if (DataCoolantTemp_Dis.u8_Holdtimer >= CoolantFlashtimer)
{
DataCoolantTemp_Dis.u8_Holdtimer = CoolantFlashtimer;
}
/*目标格和当前格一致时,数显如何处理*/
/*5S后更新为目标数值*/
u32ColCurNum = Data_Coolant_Cal_Num(DataCoolantTemp_Dis.u8_CurSeg, 2, (CoolantFlashtimer-DataCoolantTemp_Dis.u8_Holdtimer ), u32ColCurNum, DataCoolantTemp.Value*100);
u32ColCurNum = DataCoolantTemp.Value * 100;
}
// warning
......
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