Rockbox

Tasklist

FS#2755 - Battery Benchmark Plugin

Attached to Project: Rockbox
Opened by Alexander Spyridakis (xaviergr) - Tuesday, 15 November 2005, 13:24 GMT
Last edited by Linus Nielsen Feltzing (linusnielsen) - Thursday, 26 January 2006, 22:39 GMT
Task Type Patches
Category Plugins
Status Closed
Assigned To No-one
Operating System
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

This is a battery benchmark plugin very different from
already known battery_test in cvs.

This plugin is a "tsr" which means that creates a
thread and runs in the backround.

Battery Benchmark will autodetect any HD activity and
log your battery performance into a txt file
(/battery_bench.txt) every time the hard disk spins.
This will happen until you load another plugin,
shutdown, or the player runs out of battery.

The log has various information about the battery.
Time, runtime in seconds, Battery Percent level,
Estimated minutes and battery voltage. Then it can be
used with various graph programs (e.g excel) to see
your battery performance.

The benchmark is very accurate becuase it will log
until the last successful HD activity. (Marginal error
of ~+30 minutes depending on the files you
playback.Worst case scenario for 128kbps mp3)

This task depends upon

Closed by  Linus Nielsen Feltzing (linusnielsen)
Thursday, 26 January 2006, 22:39 GMT
Reason for closing:  Accepted
Comment by Alexander Spyridakis (xaviergr) - Friday, 18 November 2005, 04:09 GMT

Update: Tests show that this plugin will NOT affect the
battery time overall.

Made a small 2KB buffer that will monitor voltage changes
and log them next time the disk spins up.

Added firmware file and the rock for users that can't compile.

Warning: The plugin version has been changed so if you can't
compile then replace the firmware with this one, else you
will get Incompatible version.
Comment by Alexander Spyridakis (xaviergr) - Friday, 18 November 2005, 04:33 GMT

Note: Use -p2 when patching.
Comment by Alexander Spyridakis (xaviergr) - Thursday, 08 December 2005, 01:16 GMT

Updated with latest unicode changes.

Changed the log format. Now titles of the stats are written
only in the top of the log.

Again use -p2 when patching.
Comment by Alexander Spyridakis (xaviergr) - Friday, 13 January 2006, 16:32 GMT

Update: The plugin is now able to store battery info on a
struct instead of a string buffer.

Also it will check if the disk isn't accessed for more than
an hour and force the disk to log the data. This is usefull
on benchmarks that will not trigger the Hard Disk.

Use -p1 for this.
Comment by Alexander Spyridakis (xaviergr) - Monday, 16 January 2006, 04:57 GMT

Update the plugin to compile with the latest mass plugin
update in CVS.
Comment by Alexander Spyridakis (xaviergr) - Thursday, 19 January 2006, 00:15 GMT

Update: Made the plugin more secure.
Now it will quit safely if someone couples the USB cable
while plugin runs. Also better sleeping (yield) code.
Comment by Alexander Spyridakis (xaviergr) - Monday, 23 January 2006, 20:51 GMT

Update:
1)More secure policies.
2)The plugin will force a log on another-plugin loading,
(while benchmarking) and if the user shuts down the unit.
3)Cycling behaviour of the buffer if it is filled (new
measurements in place of old)
4)USB log mode. Now the plugin can be used in the USB mode
too. Only hidrance is that you will have to enter rockbox at
least once if you want your measurements logged on a file.
(Disk access impossible in USB mode)

Loading...