From 414dad42c59f43919489f45236d57e1b345b8a65 Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Sat, 15 May 2010 15:03:16 +0000 Subject: If HAVE_POWEROFF_WHILE_CHARGING is not defined and the charging configuration specifies CHARGING_MONITOR or greater, allow poweroff while plugged but not actually charging the battery. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26055 a1c6a512-1295-4272-9138-f99709370657 --- firmware/powermgmt.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'firmware/powermgmt.c') diff --git a/firmware/powermgmt.c b/firmware/powermgmt.c index f1dd83ef52..bf5734c264 100644 --- a/firmware/powermgmt.c +++ b/firmware/powermgmt.c @@ -358,7 +358,11 @@ static void handle_auto_poweroff(void) if (usb_inserted() #if CONFIG_CHARGING && !defined(HAVE_POWEROFF_WHILE_CHARGING) +#if CONFIG_CHARGING >= CHARGING_MONITOR + || charging_state() +#else || charger_input_state != NO_CHARGER +#endif #endif ) { DEBUGF("Sleep timer timeout. Stopping...\n"); -- cgit v1.2.3