Round displayed power up slightly.

Avoids a corner case where the power is a nice round number like 1300, but displayed as 1299.
master
Cyp 2011-12-17 15:30:32 +01:00
parent e9bdbdf331
commit fb7245c7d2
1 changed files with 2 additions and 2 deletions

View File

@ -566,8 +566,8 @@ void intDisplayPowerBar(WIDGET *psWidget, UDWORD xOffset, UDWORD yOffset, WZ_DEC
lastRealTime = realTime;
ManPow = ManuPower / POWERBAR_SCALE;
Avail = displayPower / POWERBAR_SCALE;
realPower = displayPower - ManuPower;
Avail = (displayPower + 1e-8) / POWERBAR_SCALE;
realPower = (displayPower + 1e-8) - ManuPower;
BarWidth = BarGraph->width;
iV_SetFont(font_regular);