[PATCH] Linear regression in UPower
hughsient at gmail.com
Wed Oct 19 09:15:29 PDT 2011
On 19 October 2011 16:45, Leonardo Robol <leo at robol.it> wrote:
> If you think that this isn't a good idea, feel free to remove it.
I've merged your patch with a few stylistic tweaks as:
Author: Leonardo Robol <leo at robol.it>
Date: Wed Oct 19 17:13:12 2011 +0100
Use linear regression to get better predicted battery times
For hardware that has no rate data we use the differences in
charge over a time
period to work out the effective rate. Using linear regression
is much more realistic.
To do this, introduce a simple circular buffer and use an index to calculate
the rate on each update.
Signed-off-by: Richard Hughes <richard at hughsie.com>
More information about the devkit-devel