summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNils Wallménius <nils@rockbox.org>2007-01-28 20:38:11 +0000
committerNils Wallménius <nils@rockbox.org>2007-01-28 20:38:11 +0000
commit942e4d8d5837512150b01d44661de9e988785fc2 (patch)
tree9bb435c1e4c1cb182692c200de991b6127e2bfd2
parent84b509dc43cf84ef16fcd4a57b167351f146cd11 (diff)
downloadrockbox-942e4d8d5837512150b01d44661de9e988785fc2.tar.gz
rockbox-942e4d8d5837512150b01d44661de9e988785fc2.zip
Do not change backlight timeout and disk spindown timeout when battery is low
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12137 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/powermgmt.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/firmware/powermgmt.c b/firmware/powermgmt.c
index 7f796abde5..5c7607413c 100644
--- a/firmware/powermgmt.c
+++ b/firmware/powermgmt.c
@@ -347,7 +347,6 @@ static const char power_thread_name[] = "power";
347 347
348static int poweroff_timeout = 0; 348static int poweroff_timeout = 0;
349static int powermgmt_est_runningtime_min = -1; 349static int powermgmt_est_runningtime_min = -1;
350static bool low_battery = false;
351 350
352static bool sleeptimer_active = false; 351static bool sleeptimer_active = false;
353static long sleeptimer_endtick; 352static long sleeptimer_endtick;
@@ -623,27 +622,6 @@ static void handle_auto_poweroff(void)
623 } 622 }
624#endif 623#endif
625 624
626 /* For low battery condition do some power-saving stuff */
627 if (!low_battery && battery_level_critical()) {
628#if CONFIG_BACKLIGHT == BL_IRIVER_H100
629 backlight_set_fade_in(0);
630 backlight_set_fade_out(0);
631#endif
632#if defined(CONFIG_BACKLIGHT) && !defined(BOOTLOADER)
633 if (backlight_get_current_timeout() > 2)
634#endif
635 backlight_set_timeout(2);
636#ifdef HAVE_REMOTE_LCD
637 remote_backlight_set_timeout(2);
638#endif
639 ata_spindown(3);
640 low_battery = true;
641 } else if (low_battery && (battery_percent > 11)) {
642 backlight_set_timeout(10);
643 ata_spindown(10);
644 low_battery = false;
645 }
646
647 /* switch off unit if battery level is too low for reliable operation */ 625 /* switch off unit if battery level is too low for reliable operation */
648#if (CONFIG_BATTERY!=BATT_4AA_NIMH) && (CONFIG_BATTERY!=BATT_3AAA)&& \ 626#if (CONFIG_BATTERY!=BATT_4AA_NIMH) && (CONFIG_BATTERY!=BATT_3AAA)&& \
649 (CONFIG_BATTERY!=BATT_1AA) 627 (CONFIG_BATTERY!=BATT_1AA)