summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2004-10-15 18:52:54 +0000
committerJens Arnold <amiconn@rockbox.org>2004-10-15 18:52:54 +0000
commit672305f0a1fe8e423904f95d5cb22aea68ff4c62 (patch)
tree82d2af855811058136a1d11b22ab6a386224abec /firmware
parentc4f96930f03db6c715f71dcf964217179cc698d4 (diff)
downloadrockbox-672305f0a1fe8e423904f95d5cb22aea68ff4c62.tar.gz
rockbox-672305f0a1fe8e423904f95d5cb22aea68ff4c62.zip
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
Diffstat (limited to 'firmware')
-rw-r--r--firmware/powermgmt.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/firmware/powermgmt.c b/firmware/powermgmt.c
index 9cd88819d9..35b311a9e8 100644
--- a/firmware/powermgmt.c
+++ b/firmware/powermgmt.c
@@ -227,12 +227,15 @@ void battery_level_update(void)
227 /* always use the decharge table */ 227 /* always use the decharge table */
228#endif 228#endif
229 229
230#ifndef HAVE_MMC /* this adjustment is only needed for HD based */
230 if (battery_level_cached == -1) { /* first run of this procedure */ 231 if (battery_level_cached == -1) { /* first run of this procedure */
231 /* the battery voltage is usually a little lower directly after 232 /* the battery voltage is usually a little lower directly after
232 turning on, because the disk was used heavily raise it by 5 % */ 233 turning on, because the disk was used heavily raise it by 5 % */
233 battery_level_cached = (level > 95) ? 100 : level + 5; 234 battery_level_cached = (level > 95) ? 100 : level + 5;
234 } 235 }
235 else { 236 else
237#endif
238 {
236 /* the level is allowed to be -1 of the last value when usb not 239 /* the level is allowed to be -1 of the last value when usb not
237 connected and to be -3 of the last value when usb is connected */ 240 connected and to be -3 of the last value when usb is connected */
238 if (usb_inserted()) { 241 if (usb_inserted()) {