[PATCH] Linear regression in UPower
Richard Hughes
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:
commit b971b43c45bef9251e1d6389716b9fbe107802c7
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
this estimation
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>
Thanks!
Richard.
More information about the devkit-devel
mailing list