1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2025-02-04 04:58:32 +00:00

Limit $battery_percent to 100 (bug 2145006)

This commit is contained in:
Brenden Matthews 2008-12-07 15:58:40 -07:00
parent 39ba74a590
commit e2c49531f3
2 changed files with 2 additions and 0 deletions

View File

@ -4,6 +4,7 @@
* Allow more than 9 CPUs for CPU stats (bug 2155500)
* Fix broken $execbar (bug 2133709)
* Don't put unit with hddtemp values for consistency (bug 2133107)
* Limit $battery_percent to 100 (bug 2145006)
2008-12-06
* Switching from svn to git repository. The repo can be viewed from

View File

@ -1940,6 +1940,7 @@ int get_battery_perct(const char *bat)
/* compute the battery percentage */
last_battery_perct[idx] =
(int) (((float) remaining_capacity / acpi_design_capacity[idx]) * 100);
if (last_battery_perct[idx] > 100) last_battery_perct[idx] = 100;
return last_battery_perct[idx];
}