1
0
Fork 0
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:
Jens Arnold 2004-10-15 18:52:54 +00:00
parent c4f96930f0
commit 672305f0a1

View file

@ -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()) {