Commit bf24c047 authored by 郑萍's avatar 郑萍

🐞 fix:56322 【豪进750TFT】【车、转速】转速走格不流畅,车、转速显示异常

parent 5e66304c
......@@ -289,26 +289,26 @@ void Data_Engine_Speed_Processing_Service ( void )
}
}
DataESpeedDisp = DataESPeedDamping.Speed;
// //第4步 增加回差
// if (DataESpeedDisp <= 80)
// {
// DataESpeedDisp = DataESPeedDamping.Speed;
// }
// else
// {
// if ( DataESpeedDisp < DataESPeedDamping.Speed )
// {
// DataESpeedDisp = DataESPeedDamping.Speed;
// }
// else
// {
// Delta = DataESpeedDisp - DataESPeedDamping.Speed;
// if ( Delta >= DATA_ESPEED_HYSTERESIS )
// {
// DataESpeedDisp = DataESPeedDamping.Speed;
// }
// }
// }
//第4步 增加回差
if (DataESpeedDisp <= 80)
{
DataESpeedDisp = DataESPeedDamping.Speed;
}
else
{
if ( DataESpeedDisp < DataESPeedDamping.Speed )
{
DataESpeedDisp = DataESPeedDamping.Speed;
}
else
{
Delta = DataESpeedDisp - DataESPeedDamping.Speed;
if ( Delta >= DATA_ESPEED_HYSTERESIS )
{
DataESpeedDisp = DataESPeedDamping.Speed;
}
}
}
}
uint8_t Get_EngineValid(void)
......
......@@ -321,12 +321,22 @@ void Data_Vehicle_Speed_Processing_Service(void)
}
// 第3步:生成显示车速
DataVSpeedHysteresis = DataVSPeedDamping.Speed;
if ((DataVSPeedDamping.Speed >= DataVSpeedHysteresis) || (DataVSPeedDamping.Speed < DATA_VSPEED_HYSTERESIS))
{
DataVSpeedHysteresis = DataVSPeedDamping.Speed;
}
else
{
if (DataVSpeedHysteresis - DataVSPeedDamping.Speed >= DATA_VSPEED_HYSTERESIS)
{
DataVSpeedHysteresis = DataVSPeedDamping.Speed;
}
}
VSpeedCal = ( uint32_t )DataVSpeedHysteresis;
if ( DataVSpeedValid )
{
// if ( DataVSpeedValid )
// {
VSpeedCal *= 105;
VSpeedCal /= 100;
// if((VSpeedCal % 10) >= 5)
......@@ -334,11 +344,11 @@ void Data_Vehicle_Speed_Processing_Service(void)
// VSpeedCal += 5; /* 四舍五入 */
// }
DataVSpeedDisp = ( uint16_t )VSpeedCal;
}
else
{
DataVSpeedDisp = 0;
}
// }
// else
// {
// DataVSpeedDisp = 0;
// }
}
/*车速有效位:有效=1,无效=0*/
......
......@@ -4217,23 +4217,9 @@ void AMT630H_GUI_BACKGRAND()
VechileSpeed = Get_DispVechileSpeed() / 10;
}
if (Get_VechileSpeedValid() == 1)
{
AMT630H_GUI_VSpeed(VechileSpeed);
}
else
{
AMT630H_GUI_VSpeed(0);
}
AMT630H_GUI_VSpeed(VechileSpeed);
/*转速*/
if (Get_EngineValid() == 1)
{
AMT630H_GUI_ESpeed(Get_DispEngineSpeed());
}
else
{
AMT630H_GUI_ESpeed(0);
}
AMT630H_GUI_ESpeed(Get_DispEngineSpeed());
}
......
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