• Status Closed
  • Percent Complete
  • Task Type Patches
  • Category Plugins
  • Assigned To No-one
  • Operating System
  • Severity Low
  • Priority Very Low
  • Reported Version
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by xaviergr - 2005-11-15
Last edited by linusnielsen - 2006-01-26

FS#2755 - Battery Benchmark Plugin

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)

Closed by  linusnielsen
2006-01-26 22:39
Reason for closing:  Accepted

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.

Note: Use -p2 when patching.

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.

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.

Update the plugin to compile with the latest mass plugin
update in CVS.

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.

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)


Available keyboard shortcuts


Task Details

Task Editing