Commit bf24c047 authored by 郑萍's avatar 郑萍

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

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