forked from len0rd/rockbox
Another small adjustment for Ondio: Don't adjust initial battery level for non-existing HD activity
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5287 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
c4f96930f0
commit
672305f0a1
1 changed files with 4 additions and 1 deletions
|
|
@ -227,12 +227,15 @@ void battery_level_update(void)
|
||||||
/* always use the decharge table */
|
/* always use the decharge table */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef HAVE_MMC /* this adjustment is only needed for HD based */
|
||||||
if (battery_level_cached == -1) { /* first run of this procedure */
|
if (battery_level_cached == -1) { /* first run of this procedure */
|
||||||
/* the battery voltage is usually a little lower directly after
|
/* the battery voltage is usually a little lower directly after
|
||||||
turning on, because the disk was used heavily raise it by 5 % */
|
turning on, because the disk was used heavily raise it by 5 % */
|
||||||
battery_level_cached = (level > 95) ? 100 : level + 5;
|
battery_level_cached = (level > 95) ? 100 : level + 5;
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
/* the level is allowed to be -1 of the last value when usb not
|
/* the level is allowed to be -1 of the last value when usb not
|
||||||
connected and to be -3 of the last value when usb is connected */
|
connected and to be -3 of the last value when usb is connected */
|
||||||
if (usb_inserted()) {
|
if (usb_inserted()) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue