so all i really did is figure out how to call the read and write function of the fuel gauge chip inside the nexus one battery, so that on command you can read or write to any of the 80 register addresses. lot's of interesting other things we are doing with this, but not really related. but this does allow us to sample the voltage and current registers at any time you want.
i added multiple device attribute (sysfs) files in the battery driver to do various things for the app we're writing. of those files, i made sure to add "getvoltage" and "getcurrent" which returns the instant readings for the graphing part of the app to see real time power draw. the driver changes start at line 419 to 800, specifically line 596 is for the current draw. http://github.com/R0gerP0dacter/n1batcal/blob/master/ds2784_battery.c one may question the accuracy of the sense resistor inside the battery which the readings are taken. that's fine, though it doesnt really matter for the purposes of comparing different tasks against each other. sorry if this is or isn't as exciting as what you're looking for, it cannot help separating individual CPU processes to see their power draw. you can only see the instant current coming thru the battery while doing different tasks. i've found it very interesting (now that the graphing is working in my app, showing current draw at 2 second intervals) to see just how huge of a difference there is for example doing certain things on wifi vs 3g. i guess because wifi is so much faster, but 3g is a total hog using about 2.5x more power to do the same thing. its really huge difference. and it takes much longer too likely from higher latency. anyway the app is cool too, only just added graphs. interestingly our app helps activate the learn cycle that the ds2784 battery chip supports, to re-calibrate the nexus one battery. its too bad we needed root to get access to this, cause the chip handles it all itself, we just had to get access to it via the battery driver edits. if you're interested: http://github.com/R0gerP0dacter/BatteryCalibrator/tree/master/src/net/jonrichards/batterycalibrator/ui cheers! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

