1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Linus Nielsen Feltzing 2002-12-04 12:53:10 +00:00
parent 34351e8251
commit d41942e12f

View file

@ -256,12 +256,20 @@ static void handle_auto_poweroff(void)
!usb_inserted())
{
if(TIME_AFTER(current_tick, sleeptimer_endtick))
{
if(charger_is_inserted)
{
DEBUGF("Sleep timer timeout. Rebooting...\n");
system_reboot();
}
else
{
DEBUGF("Sleep timer timeout. Shutting off...\n");
power_off();
}
}
}
}
}
/*