Indicator doesn't use weighted average with different-sized batteries
Bug #1430542 reported by
Allison Karlitskaya
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
indicator-power (Ubuntu) |
Triaged
|
Medium
|
Unassigned |
Bug Description
The indicator implements the spec:
https:/
which stated:
"Their percentages should be averaged."
Apparently this was taken to mean the simple arithmetic mean, and not the weighted average (by the capacity of each battery).
shows:
const double percent = sum_percent / n_batteries;
This means that if one battery is twice as large as another, then after that battery is discharged, 50% would be reported. I'd expect 33%.
The code needs to be fixed to reflect the more precise use of the word "average". <https:/
Changed in indicator-power (Ubuntu): | |
importance: | Undecided → Medium |
To post a comment you must log in.
Mea culpa. It never occurred to me that a device might contain multiple batteries of different capacities.