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:
parent
39ba74a590
commit
e2c49531f3
@ -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
|
||||
|
@ -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];
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user