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.tar.gz rockbox-d41942e12f6a63b1067e9d3b91e55a02ad78b2b6.zip |
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 27c200aaeb..69b28b9f31 100644 --- a/firmware/powermgmt.c +++ b/firmware/powermgmt.c | |||
@@ -257,8 +257,16 @@ static void handle_auto_poweroff(void) | |||
257 | { | 257 | { |
258 | if(TIME_AFTER(current_tick, sleeptimer_endtick)) | 258 | if(TIME_AFTER(current_tick, sleeptimer_endtick)) |
259 | { | 259 | { |
260 | DEBUGF("Sleep timer timeout. Shutting off...\n"); | 260 | if(charger_is_inserted) |
261 | power_off(); | 261 | { |
262 | DEBUGF("Sleep timer timeout. Rebooting...\n"); | ||
263 | system_reboot(); | ||
264 | } | ||
265 | else | ||
266 | { | ||
267 | DEBUGF("Sleep timer timeout. Shutting off...\n"); | ||
268 | power_off(); | ||
269 | } | ||
262 | } | 270 | } |
263 | } | 271 | } |
264 | } | 272 | } |