After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 747370 - Backlight dropdown gets cut off
Backlight dropdown gets cut off
Status: RESOLVED FIXED
Product: gnome-battery-bench
Classification: Other
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GNOME battery bench maintainer(s)
GNOME battery bench maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2015-04-05 11:47 UTC by Andreas Nilsson
Modified: 2015-06-30 21:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
screenshot (52.25 KB, image/png)
2015-04-05 11:47 UTC, Andreas Nilsson
  Details
When battery reports amps not watts, approximate the power (3.28 KB, patch)
2015-06-30 21:15 UTC, Owen Taylor
committed Details | Review
Don't add together voltage_now values for multiple batteries (1.75 KB, patch)
2015-06-30 21:15 UTC, Owen Taylor
committed Details | Review
Improve the approximation of power from current (2.50 KB, patch)
2015-06-30 21:15 UTC, Owen Taylor
committed Details | Review

Description Andreas Nilsson 2015-04-05 11:47:13 UTC
Created attachment 300984 [details]
screenshot

This is on a hidpi monitor if that makes any difference.
Comment 1 Owen Taylor 2015-06-30 21:15:45 UTC
Created attachment 306439 [details] [review]
When battery reports amps not watts, approximate the power

On systems that report battery capacity in amps, not watts, we can
approximate the power used by looking at the reported battery voltage.
Comment 2 Owen Taylor 2015-06-30 21:15:48 UTC
Created attachment 306440 [details] [review]
Don't add together voltage_now values for multiple batteries

If there are multiple batteries, it's not possible to compute an
overall "voltage_now" for the system, so just ignore it.
Comment 3 Owen Taylor 2015-06-30 21:15:52 UTC
Created attachment 306441 [details] [review]
Improve the approximation of power from current

P = Integral from Q1 to Q2 of V(Q)dQ

Use:

 (V1 + V2)/2 * (Q2 - Q1)

as the trapezoid rule approximation of this instead of:

 V2 * Q2 - V1 * Q1

which doesn't have a clear meaning. If V is constant, both are
the same, but for example, if we had a capacitor with V(Q) = Q/C,
then the old expression would over-estimate by a factor of 2,
while the new expression is asymptotically right for small changes.
Comment 4 Owen Taylor 2015-06-30 21:18:20 UTC
Attachment 306439 [details] pushed as 3eb42d2 - When battery reports amps not watts, approximate the power
Attachment 306440 [details] pushed as b769f92 - Don't add together voltage_now values for multiple batteries
Attachment 306441 [details] pushed as fa60529 - Improve the approximation of power from current