A modern Music Player Daemon based on Rockbox open source high quality audio player
libadwaita
audio
rust
zig
deno
mpris
rockbox
mpd
1\subsection{Battery Benchmark}
2The \setting{Battery Benchmark} plugin enables you to test your battery's
3performance whilst using your \dap\ normally. Results can be submitted
4to the \wikilink{BatteryRuntime} wiki page.
5
6\subsubsection{How it works}
7Once loaded, \setting{Battery Benchmark} runs in the
8background recording various information about your battery to memory.
9A new point is written to memory every minute.
10Every time the disk is accessed for any reason
11(such as refilling the audio buffer, opening a directory or entering
12USB mode etc.) then the information in memory is written to disk.
13Once the memory becomes full (after many hours), then the data
14are written to disk anyway. This is done so that the data are not biased by
15excessive additional disk accesses. The file is written to the root
16directory of your \dap\ and is called \fname{battery\_bench.txt}.
17The plugin will continue to log info until:
18
19\begin{itemize}
20\item Another plugin is loaded.
21\item The \dap\ is shut down.
22\item The battery is empty.
23\end{itemize}
24
25Benchmarks can be resumed if
26you accidentally load a plugin, or turn off your \dap, so long as the log
27file \fname{battery\_bench.txt} is not deleted.
28
29\subsubsection{Information explained}
30At the top of the \fname{battery\_bench.txt} file is various
31information on how to use the plugin, followed by the data themselves.
32
33\begin{description}
34\item[Time] This column reports the total time of operation of the \dap. It is
35not the time that you started the plug-in. If you have your \dap\ on for 5
36minutes and then start the plugin, it will start measuring from 5 minutes.
37\item[Seconds] The same as \config{Time}, except measured in seconds.
38\item[Level] The percent level of the battery estimated by Rockbox, and not the
39actual battery level. The actual battery level can be seen from the
40\config{Voltage} column
41\item[Time Left] This shows the time remaining until the battery is empty,
42again as estimated by Rockbox.
43\item[Voltage] The battery voltage in mV at the moment the measurement
44was taken.
45\item[C] This stands for Charger. An ``A'' in that column shows if the power
46adapter was attached to the unit at the time of the measurement.
47\item[U] USB powered. Only for targets that support this. A ``U'' will indicate
48if the unit was using the USB port for power at the time of the measurement.
49\end{description}
50
51\subsubsection{Usage}
52The log file can be used to tell you how long the battery lasted (with some
53limitations, see below), but it is most useful for graphing discharge curves
54in order to improve Rockbox's estimation of battery level and time remaining.
55The battery log (\fname{battery\_bench.txt}) is in CSV format
56(comma separated variables) and thus can be easily imported into a spreadsheet
57or similar program.
58
59\subsubsection{Limitations}
60As \setting{Battery Benchmark} needs to write the data held in memory to
61disk in order to save them, it is possible that should Rockbox shut down
62due to low battery then there will not be enough power remaining to write the
63data to disk. Therefore all measurements since the previous save will be lost.
64
65\subsubsection{Advanced}
66On first run \setting{Battery Benchmark} will export the default battery tables
67to '/.rockbox/battery\_levels.default'
68You can use the values recorded by \setting{Battery Benchmark}
69to more accurately reflect the capacity of your individual battery.
70Once you have made your changes rename '.default' to '.cfg' and your custom
71battery table will be loaded next boot.
72
73\note{\setting{WARNING} be aware 'shutoff' and 'disksafe' levels are to protect your player
74both over-discharge of the battery and to prevent dataloss.
75Setting these values incorrectly may cause damage to your \dap{}, battery, data, or disk.
76However, 'discharge' and 'charge' tables are only used to calibrate the battery
77meter and should be safe to change to any value.
78Each entry should be greater or equal to 'shutdown' and or the previous table entry
79otherwise the battery tables will be rejected.
80}