diff options
author | Richard Hughes <richard@hughsie.com> | 2008-12-19 08:31:30 +0000 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2008-12-19 08:31:30 +0000 |
commit | 71e40db432066dead1f0bd77264bd686750dba35 (patch) | |
tree | cf144605c870b523802c25073454e1c9b13b331d /src | |
parent | c5e7a481d4862874c63e13264a88e258880eff48 (diff) |
bugfix: fix the battery capacity calculation. Fixes fd#19165
Diffstat (limited to 'src')
-rw-r--r-- | src/dkp-supply.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dkp-supply.c b/src/dkp-supply.c index b68ecd3..94c99d3 100644 --- a/src/dkp-supply.c +++ b/src/dkp-supply.c @@ -275,7 +275,7 @@ dkp_supply_refresh_battery (DkpSupply *supply) /* calculate how broken our battery is */ if (obj->energy_full > 0) { - obj->capacity = obj->energy_full_design / obj->energy_full * 100.0f; + obj->capacity = (obj->energy_full / obj->energy_full_design) * 100.0f; if (obj->capacity < 0) obj->capacity = 0; if (obj->capacity > 100.0) |