forked from len0rd/rockbox
battery_bench export_battery_tables add warnings
moves shutoff and disk safe to end of file add warning comment out shutoff and disksafe level as further protection Change-Id: I1723b2ae6b2bd7fd359dc7dfcc8f1958d97673fc
This commit is contained in:
parent
154a20c2eb
commit
10b4cab793
1 changed files with 13 additions and 9 deletions
|
@ -539,14 +539,6 @@ void do_export_battery_tables(void)
|
||||||
rb->fdprintf(fd, "# Rename to %s\n# " MODEL_NAME " Battery Levels (%s)\n\n",
|
rb->fdprintf(fd, "# Rename to %s\n# " MODEL_NAME " Battery Levels (%s)\n\n",
|
||||||
BATTERY_LEVELS_USER, rb->rbversion);
|
BATTERY_LEVELS_USER, rb->rbversion);
|
||||||
|
|
||||||
rb->fdprintf(fd, "# Battery voltage(millivolt) lower than this %s\n",
|
|
||||||
"player will shutdown");
|
|
||||||
rb->fdprintf(fd, "shutoff: %d\n\n", *rb->device_battery_tables->shutoff);
|
|
||||||
|
|
||||||
rb->fdprintf(fd, "# Battery voltage(millivolt) lower than this %s\n",
|
|
||||||
"won't access the disk to write");
|
|
||||||
rb->fdprintf(fd, "disksafe: %d\n\n", *rb->device_battery_tables->disksafe);
|
|
||||||
|
|
||||||
rb->fdprintf(fd, "# Battery voltage(millivolt) of {");
|
rb->fdprintf(fd, "# Battery voltage(millivolt) of {");
|
||||||
for(i= 0;i < elems;i++)
|
for(i= 0;i < elems;i++)
|
||||||
{
|
{
|
||||||
|
@ -577,10 +569,22 @@ void do_export_battery_tables(void)
|
||||||
rb->lseek(fd, -2, SEEK_CUR); /*remove last comma */
|
rb->lseek(fd, -2, SEEK_CUR); /*remove last comma */
|
||||||
rb->fdprintf(fd, "}\n\n");
|
rb->fdprintf(fd, "}\n\n");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
rb->fdprintf(fd, "# WARNING 'shutoff' and 'disksafe' levels protect " \
|
||||||
|
"from battery over-discharge and dataloss\n\n");
|
||||||
|
|
||||||
|
rb->fdprintf(fd, "# Battery voltage(millivolt) lower than this %s\n",
|
||||||
|
"player will shutdown");
|
||||||
|
|
||||||
|
rb->fdprintf(fd, "#shutoff: %d\n\n", *rb->device_battery_tables->shutoff);
|
||||||
|
|
||||||
|
rb->fdprintf(fd, "# Battery voltage(millivolt) lower than this %s\n",
|
||||||
|
"won't access the disk to write");
|
||||||
|
rb->fdprintf(fd, "#disksafe: %d\n\n", *rb->device_battery_tables->disksafe);
|
||||||
|
|
||||||
rb->close(fd);
|
rb->close(fd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
enum plugin_status plugin_start(const void* parameter)
|
enum plugin_status plugin_start(const void* parameter)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue