Commit 59809d7a authored by 郑萍's avatar 郑萍

feat:燃油阻值更改

parent 0a780149
......@@ -217,57 +217,73 @@ void Fuel_Gauges_Cal(uint8_t deltaTime)
/*计算目标格数*/
if (g_u8FuelDir == FUEL_SEG_UP)
{
if (((g_u8DesFuelSetp == 5) || g_u8FuelInitFlag) && (FuelR < 30))
if (((g_u8DesFuelSetp == 7) || g_u8FuelInitFlag) && (FuelR <= 110))
{
g_u8DesFuelSetp = 8;
}
else if (((g_u8DesFuelSetp == 6) || g_u8FuelInitFlag) && (FuelR <= 210))
{
g_u8DesFuelSetp = 7;
}
else if (((g_u8DesFuelSetp == 5) || g_u8FuelInitFlag) && (FuelR <= 310))
{
g_u8DesFuelSetp = 6;
}
else if (((g_u8DesFuelSetp == 4) || g_u8FuelInitFlag) && (FuelR < 160))
else if (((g_u8DesFuelSetp == 4) || g_u8FuelInitFlag) && (FuelR <= 380))
{
g_u8DesFuelSetp = 5;
}
else if (((g_u8DesFuelSetp == 3) || g_u8FuelInitFlag) && (FuelR < 300))
else if (((g_u8DesFuelSetp == 3) || g_u8FuelInitFlag) && (FuelR <= 490))
{
g_u8DesFuelSetp = 4;
}
else if (((g_u8DesFuelSetp == 2) || g_u8FuelInitFlag) && (FuelR < 500))
else if (((g_u8DesFuelSetp == 2) || g_u8FuelInitFlag) && (FuelR <= 610))
{
g_u8DesFuelSetp = 3;
}
else if (((g_u8DesFuelSetp == 1) || g_u8FuelInitFlag) && (FuelR < 790))
else if (((g_u8DesFuelSetp == 1) || g_u8FuelInitFlag) && (FuelR <= 830))
{
g_u8DesFuelSetp = 2;
}
else if (((g_u8DesFuelSetp == 0) || g_u8FuelInitFlag) && (FuelR <= 3100))
else if (((g_u8DesFuelSetp == 0) || g_u8FuelInitFlag) && (FuelR <= 5000))
{
g_u8DesFuelSetp = 1;
}
}
else if (g_u8FuelDir == FUEL_SEG_DOWN)
{
if (((g_u8DesFuelSetp == 1) || g_u8FuelInitFlag) && (FuelR > 3100))
if (((g_u8DesFuelSetp == 1) || g_u8FuelInitFlag) && (FuelR > 5000))
{
g_u8DesFuelSetp = 0;
}
else if (((g_u8DesFuelSetp == 2) || g_u8FuelInitFlag) && (FuelR >= 790))
else if (((g_u8DesFuelSetp == 2) || g_u8FuelInitFlag) && (FuelR > 830))
{
g_u8DesFuelSetp = 1;
}
else if (((g_u8DesFuelSetp == 3) || g_u8FuelInitFlag) && (FuelR >= 500))
else if (((g_u8DesFuelSetp == 3) || g_u8FuelInitFlag) && (FuelR > 610))
{
g_u8DesFuelSetp = 2;
}
else if (((g_u8DesFuelSetp == 4) || g_u8FuelInitFlag) && (FuelR >= 300))
else if (((g_u8DesFuelSetp == 4) || g_u8FuelInitFlag) && (FuelR > 490))
{
g_u8DesFuelSetp = 3;
}
else if (((g_u8DesFuelSetp == 5) || g_u8FuelInitFlag) && (FuelR >= 160))
else if (((g_u8DesFuelSetp == 5) || g_u8FuelInitFlag) && (FuelR > 380))
{
g_u8DesFuelSetp = 4;
}
else if (((g_u8DesFuelSetp == 6) || g_u8FuelInitFlag) && (FuelR >= 30))
else if (((g_u8DesFuelSetp == 6) || g_u8FuelInitFlag) && (FuelR > 310))
{
g_u8DesFuelSetp = 5;
}
else if (((g_u8DesFuelSetp == 7) || g_u8FuelInitFlag) && (FuelR > 210))
{
g_u8DesFuelSetp = 6;
}
else if (((g_u8DesFuelSetp == 8) || g_u8FuelInitFlag) && (FuelR > 110))
{
g_u8DesFuelSetp = 7;
}
}
}
......
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