diff options
| author | Linus Nielsen Feltzing <linus@haxx.se> | 2002-12-04 12:53:10 +0000 |
|---|---|---|
| committer | Linus Nielsen Feltzing <linus@haxx.se> | 2002-12-04 12:53:10 +0000 |
| commit | d41942e12f6a63b1067e9d3b91e55a02ad78b2b6 (patch) | |
| tree | 3589a5e3f05ea2a8119e748800472cb3d1256263 | |
| parent | 34351e8251348ae5cb35d8b98cc4095406268335 (diff) | |
| download | rockbox-d41942e12f6a63b1067e9d3b91e55a02ad78b2b6.zip rockbox-d41942e12f6a63b1067e9d3b91e55a02ad78b2b6.tar.gz rockbox-d41942e12f6a63b1067e9d3b91e55a02ad78b2b6.tar.bz2 rockbox-d41942e12f6a63b1067e9d3b91e55a02ad78b2b6.tar.xz | |
Sleeptimer now reboots instead of poweroff when charger is attached
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2926 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | firmware/powermgmt.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/firmware/powermgmt.c b/firmware/powermgmt.c index 27c200a..69b28b9 100644 --- a/firmware/powermgmt.c +++ b/firmware/powermgmt.c @@ -257,8 +257,16 @@ static void handle_auto_poweroff(void) { if(TIME_AFTER(current_tick, sleeptimer_endtick)) { - DEBUGF("Sleep timer timeout. Shutting off...\n"); - power_off(); + if(charger_is_inserted) + { + DEBUGF("Sleep timer timeout. Rebooting...\n"); + system_reboot(); + } + else + { + DEBUGF("Sleep timer timeout. Shutting off...\n"); + power_off(); + } } } } |