Major power concern

Martin Dengler martin at martindengler.com
Tue Oct 7 05:07:43 EDT 2008


On Tue, Oct 07, 2008 at 09:56:10AM +0200, Marco Pesenti Gritti wrote:
> On Tue, Oct 7, 2008 at 6:02 AM, John Gilmore <gnu at toad.com> wrote:
> >  /usr/share/sugar/shell/view/devices/battery.py
> >
> >                #TODO: make this less of an wild/educated guess
> >                minutes_remaining = int(current_level / 0.59)
> >                remaining_hourpart = minutes_remaining / 60
> >                remaining_minpart = minutes_remaining % 60
> >                secondary_text = _('%(hour)d:%(min).2d remaining'
> >                                   % { 'hour': remaining_hourpart,
> >                                       'min': remaining_minpart})
> >
> > How, uh, unusual to slip this into a release at the last minute!
> >
> > The battery code has moved all around in the last two weeks (I think
> > it's been in three different places in the Sugar tree), so I found
> > it too hard to track who put this change in, and why.
> 
> It's not hard at all, just use gitweb to look at the history of the
> file in the sucrose-0.82 branch. And it's not a last minute change.
> 
> http://dev.laptop.org/git?p=sugar;a=commitdiff;h=cf6bd9384004cb47cf5a0f77c31049624cff7dd0

It was I, basically, and a better solution is harder than dividing by
0.59[1].  Anyone wishing to improve the situation[2] might find trac
#4204 interesting:

http://dev.laptop.org/ticket/4204#comment:6

> Marco

Martin


1. This approximates the process I found myself and heard others doing
all the time to estimate battery power minutes remaining from the
percentage remaining value reported by HAL.

2. You'll note from the comment and the commit
comment and my email to devel@ pre-commit I set pretty modest
expectations for the code:

http://lists.laptop.org/pipermail/devel/2008-April/012759.html

I think the issue is that doing it right is hard:

http://lists.laptop.org/pipermail/devel/2008-April/012839.html

...and the issue isn't unknown to this list (ibid.) and 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.laptop.org/pipermail/devel/attachments/20081007/f37faa8f/attachment.sig>


More information about the Devel mailing list