Merge lp:~mdeslaur/indicator-power/fix-priorities into lp:indicator-power/15.10
| Status: | Approved |
|---|---|
| Approved by: | Charles Kerr on 2015-09-15 |
| Approved revision: | 289 |
| Proposed branch: | lp:~mdeslaur/indicator-power/fix-priorities |
| Merge into: | lp:indicator-power/15.10 |
| Diff against target: |
71 lines (+25/-3) 3 files modified
debian/changelog (+7/-0) src/service.c (+11/-2) tests/test-device.cc (+7/-1) |
| To merge this branch: | bzr merge lp:~mdeslaur/indicator-power/fix-priorities |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Charles Kerr (community) | 2015-06-02 | Approve on 2015-09-15 | |
| PS Jenkins bot | continuous-integration | Approve on 2015-06-02 | |
| Ted Gould | 2015-08-28 | Pending | |
|
Review via email:
|
|||
Description of the Change
Don't prioritize discharging items with no time estimate that have more
than 10% power remaining.
Devices with no time estimates are most likely low-power devices that
have long-lasting batteries, such as a mouse with AA batteries. For those
type of devices that contain batteries that last weeks, there is no value
in displaying their status in preference to devices that have a rapid
charge/discharge cycle.
However, there is value in knowing if the device has a battery that needs
replacing imminently, so only display it if it falls to a 10% charge or
under.
| Charles Kerr (charlesk) wrote : | # |
LGTM, this is a nice improvement.
You might want to ping mpt as a courtesy, this is the kind of detail that in the past he's documented at https:/
| Matthew Paul Thomas (mpt) wrote : | # |
Does "prioritize" mean "show in the menu title"?
For a desktop PC connected to AC power with a wireless mouse, the mouse would be the only interesting thing in the menu. What would be the title of the menu when the mouse had >10% charge?
| Marc Deslauriers (mdeslaur) wrote : | # |
The priority determines what shows in the menu title, yes.
This doesn't remove it, it simply sets it with a lower priority than other devices. On a desktop PC with AC power and a wireless mouse, the mouse would be displayed at all times.
| Marc Deslauriers (mdeslaur) wrote : | # |
Oh, actually, let me check that.
| Marc Deslauriers (mdeslaur) wrote : | # |
@mpt: ah, yes, that scenario isn't properly handled. Thanks for spotting that, I'll prepare a new merge request.
Would this be a reasonable order?
1. discharging items from least time remaining until most time remaining
2. charging items from most time left to charge to least time left to charge
3. charging items with an unknown time remaining
4. discharging items with an unknown time remaining, but 10% or below
5. batteries
6. non-line power
7. discharging items with an unknown time remaining, but above 10%
8. line-power
| Marc Deslauriers (mdeslaur) wrote : | # |
The mouse should be shown in preference to a fully-charged UPS, so this would be better:
Would this be a reasonable order?
1. discharging items from least time remaining until most time remaining
2. charging items from most time left to charge to least time left to charge
3. charging items with an unknown time remaining
4. discharging items with an unknown time remaining, but 10% or below
5. batteries
6. discharging items with an unknown time remaining, but above 10%
7. non-line power
8. line-power
| Matthew Paul Thomas (mpt) wrote : | # |
Clarifying that language from our discussion on IRC:
1. discharging things - from least time remaining, to most time remaining
2. charging things - from most time left to charge, to least time left to charge
3. charging things with unknown time remaining
4. discharging things with unknown time remaining, 10% or less charge
5. notebook batteries fully charged
6. discharging things with unknown time remaining, more than 10% charge
7. anything else fully charged
I still doubt that it's a good idea to judge things with unknown time remaining based on percentage. A quick Web search shows me people reporting their mouse battery lasting anywhere from "5 months or so" down to just "2-3 weeks". Someone who got used to the mouse icon showing up when they had 15 days left (10% * 5 months) would be unpleasantly surprised when a different mouse showed up with only 1.5 days warning (10% * 2 weeks).
Wherever it falls on that scale, though, upower has at least a week in which it can measure the decline and make an estimate of time remaining. If it is failing to make an estimate in that time, why is this not a bug in upower?
Unmerged revisions
- 289. By Marc Deslauriers on 2015-06-02
-
Don't prioritize discharging items with no time estimate that have more
than 10% power remaining.Devices with no time estimates are most likely low-power devices that
have long-lasting batteries, such as a mouse with AA batteries. For those
type of devices that contain batteries that last weeks, there is no value
in displaying their status in preference to devices that have a rapid
charge/discharge cycle.However, there is value in knowing if the device has a battery that needs
replacing imminently, so only display it if it falls to a 10% charge or
under.

PASSED: Continuous integration, rev:289 jenkins. qa.ubuntu. com/job/ indicator- power-ci/ 151/ jenkins. qa.ubuntu. com/job/ indicator- power-wily- amd64-ci/ 1 jenkins. qa.ubuntu. com/job/ indicator- power-wily- armhf-ci/ 1 jenkins. qa.ubuntu. com/job/ indicator- power-wily- armhf-ci/ 1/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/ 151/rebuild
http://