taintacular / currentwidget

Automatically exported from code.google.com/p/currentwidget
0 stars 0 forks source link

use average current vs. momentarily #8

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Enhancement:
I'd suggest to use file
/sys/class/power_supply/battery/current_avg
instead of currently used
/sys/class/power_supply/battery/current_now

_avg one do some averaging in the kernel, thus result is more stable.
_now just reads momentarily value, it may have large fluctuations.

Original issue reported on code.google.com by vladimir...@gmail.com on 31 Aug 2010 at 7:49

GoogleCodeExporter commented 9 years ago
Sorry, it is not a good idea - at least, on NexusOne, averaging period is too 
large.

perhaps, do some few second averaging instead?

Original comment by vladimir...@gmail.com on 31 Aug 2010 at 8:37

GoogleCodeExporter commented 9 years ago
The problem is that current_now updates every 20-30 seconds or so.
I guess that's the reason for the large period in current_avg.

Original comment by ran.ma...@gmail.com on 31 Aug 2010 at 8:44

GoogleCodeExporter commented 9 years ago
yes, I run this test too... indeed, fluctuations I saw was a glitch.

just dismiss this issue. _now is more appropriate.

Original comment by vladimir...@gmail.com on 31 Aug 2010 at 8:54

GoogleCodeExporter commented 9 years ago
If you'll find anything else I'd be happy to hear. :)

Original comment by ran.ma...@gmail.com on 31 Aug 2010 at 8:57