/[base]
ViewVC logotype

Revision 348065


Jump to revision: Previous Next
Author: allanjude
Date: Tue May 21 21:14:22 2019 UTC (5 years, 1 month ago)
Changed paths: 1
Log Message:
Correct the way remaining battery life is calculated

Previously, if a system had multiple batteries, the remaining life
percentage was calculated as the average of each battery's percent
remaining. This results in rather incorrect values when you consider the
case of the Thinkpad X270 that has a small 3 cell internally battery, and
a hot-swappable 9 cell battery that is used first. Battery 0 is at 100%,
but battery 1 is at 10%, you do not infact have 55% of your capacity
remaining.

The new method calculates the percentage based on remaining capacity
out of total capacity, giving a much more accurate reading.

PR:		229818
Submitted by:	Keegan Drake H.P. <kd-dev@pm.me>
MFC after:	2 weeks
Sponsored by:	Klara Systems
Event:		Waterloo Hackathon 2019


Changed paths

Path Details
Directoryhead/sys/dev/acpica/acpi_battery.c modified , text changed

  ViewVC Help
Powered by ViewVC 1.1.27