Commit 5c280a97 authored by 时昊's avatar 时昊

feat:41048修改负功率计算,判断无效值时显示--

parent c3df8338
...@@ -309,20 +309,27 @@ void Gauge_Power_Display(void) ...@@ -309,20 +309,27 @@ void Gauge_Power_Display(void)
} }
else//PTModeInd = 1,且有效时 else//PTModeInd = 1,且有效时
{ {
if(BattCurr.Value == 0) if(BattCurr.Valid == 1)
{ {
SEG_SET_PowerDial(1u, 0u, 0u, 0u); if(BattCurr.Value == 0)
{
SEG_SET_PowerDial(1u, 0u, 0u, 0u);
}
else
{
//-1格和-50%
SEG_SET_PowerDial(1u, 0x81u, 1u, 50u);
if(BattCurr.Value > 5000)
{
//-1 -2格和-100%
SEG_SET_PowerDial(1u, 0x82u, 1u, 100u);
}
}
} }
else else
{ {
//-1格和-50% SEG_SET_PowerDial(1u, 0u, 0u, 255u);
SEG_SET_PowerDial(1u, 0x81u, 1u, 50u);
if(BattCurr.Value > 5000)
{
//-1 -2格和-100%
SEG_SET_PowerDial(1u, 0x82u, 1u, 100u);
}
} }
} }
} }
......
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