Merge lp:~charlesk/indicator-power/lp-880881 into lp:indicator-power/14.04
Status: | Merged | ||||||||
---|---|---|---|---|---|---|---|---|---|
Approved by: | Ted Gould | ||||||||
Approved revision: | 232 | ||||||||
Merged at revision: | 237 | ||||||||
Proposed branch: | lp:~charlesk/indicator-power/lp-880881 | ||||||||
Merge into: | lp:indicator-power/14.04 | ||||||||
Diff against target: |
463 lines (+269/-85) 4 files modified
src/device.c (+40/-13) src/service.c (+125/-5) tests/Makefile.am (+7/-0) tests/test-device.cc (+97/-67) |
||||||||
To merge this branch: | bzr merge lp:~charlesk/indicator-power/lp-880881 | ||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ted Gould (community) | Approve | ||
PS Jenkins bot (community) | continuous-integration | Approve | |
Review via email: mp+211817@code.launchpad.net |
Commit message
If there are two batteries detected, combine their percentages and their time-remainings as per the revised spec.
Description of the change
If there are two batteries detected, combine their percentages and their time-remainings as per the revised spec.
https:/
If a device has multiple batteries and uses only one of them at a time, they should be presented as separate items inside the battery menu, but everywhere else they should be aggregated (bug 880881). Their percentages should be averaged. If any are discharging, the aggregated time remaining should be the maximum of the times for all those that are discharging, plus the sum of the times for all those that are idle. Otherwise, the aggregated time remaining should be the the maximum of the times for all those that are charging.
For example, if your notebook has two internal batteries — one fully charged, and one that will discharge in 22 minutes — and your wireless mouse battery is estimated to discharge in 27 minutes, then the menu title should represent the mouse. Even though the internal battery will lose power first, the mouse is the device that will lose power first.
PASSED: Continuous integration, rev:232 jenkins. qa.ubuntu. com/job/ indicator- power-ci/ 96/ jenkins. qa.ubuntu. com/job/ indicator- power-trusty- amd64-ci/ 33 jenkins. qa.ubuntu. com/job/ indicator- power-trusty- armhf-ci/ 33 jenkins. qa.ubuntu. com/job/ indicator- power-trusty- armhf-ci/ 33/artifact/ work/output/ *zip*/output. zip
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/indicator- power-ci/ 96/rebuild
http://