Commit 4aaa4e4c authored by 时昊's avatar 时昊

feat:41048修改电流发0.1时,显示错误

parent ff8f05f2
...@@ -290,10 +290,10 @@ void Gauge_Power_Display(void) ...@@ -290,10 +290,10 @@ void Gauge_Power_Display(void)
} }
BattCurr.Value = Batt_Curr; //100倍 BattCurr.Value = Batt_Curr; //100倍
BattCurr.Value *= 100;//乘100% BattCurr.Value *= 1;//乘100%
BattCurr.Value /= 200;//除200 BattCurr.Value /= 2;//除200
BattCurr.Value += 90;//大于等于10进1 0.1*100=10 //BattCurr.Value += 90;//大于等于10进1 0.1*100=10
BattCurr.Value /= 100;//1倍,留整数 //BattCurr.Value /= 100;//1倍,留整数
} }
else else
{ {
...@@ -318,7 +318,7 @@ void Gauge_Power_Display(void) ...@@ -318,7 +318,7 @@ void Gauge_Power_Display(void)
//-1格和-50% //-1格和-50%
SEG_SET_PowerDial(1u, 0x81u, 1u, 50u); SEG_SET_PowerDial(1u, 0x81u, 1u, 50u);
if(BattCurr.Value > 50) if(BattCurr.Value > 5000)
{ {
//-1 -2格和-100% //-1 -2格和-100%
SEG_SET_PowerDial(1u, 0x82u, 1u, 100u); 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