battery plasmoid and remaining time..
zwabel at googlemail.com
Fri May 15 10:30:16 CEST 2009
Am Freitag 15 Mai 2009 09:25:00 schrieb Eduardo Robles Elvira:
> * It's difficult to calculate accurately and we cannot predict the
> future, and some devices are broken. But if we relay on recent battery
> usage and percentage of battery left, which I've experienced both are
> fairly accurate measures, we can guess the future usage and get a good
> enough predictions for most of the time. You've been using 10W+-2W for
> last 10 mins, and in 10mins the battery has decreased 2%. We can
> predict that if the battery usage continues that way and the battery %
> decreases linearly, you've got X mins left. when we have less than X%
> of battery, we can be warier and tend to worst-case scenarios just to
> play it safe.
Actually I'd opt for not doing any custom calculation at all, except for maybe
smoothing the prediction over a minute or something like that. The custom
heuristics would just make the calculation "different", but for any heuristic
you can find cases where it breaks. Something like "At current usage about
3:30 left" is the most precise thing we can get. Then we just have to decide
what time "current usage" refers to.
>An use case scenario: some background process - cron, nepomuk, amarok
>indexing, whatever - rises the battery usage to 17W, well then what we
>do? when usage changes enough we can tell the user somehow. For
>example we have a visual indicator in the battery plasmoid for the %
>of battery left, and we have a yellow ray at one side which moves from
>there when we don't have the plug connected. we could reuse that ray
>to somehow hint if the battery is being consumed faster than recently
>predicted (a more obvious ray, perhaps a redder ray if consumption
>rate rose?), readjust the prediction and flash "1h left" on the top of
>the applet. This flash feature needs to be enough for the user to
>notice it but be not so prominent as to be able to ignore it easily
>too (just a good compromise), and should only be used when battery
>consumption rate changes enough to be noticeable time-wise.
A notification on significant changes would be useful, but only when it's
close to zero and when the change is to the negative, like "ca. 30 minutes
left at current usage", "ca. 10 minutes left at current usage", "ca. 3 minutes
left at current usage, shut down or suspend!"
More information about the Plasma-devel