From 63e97b66e04e34b39e525168577ed3908466d5ee Mon Sep 17 00:00:00 2001 From: Uwe Freese Date: Mon, 3 Mar 2003 13:23:11 +0000 Subject: estimate 22 percent longer runtime when having 8 MB, assuming 192 kbps files again git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3372 a1c6a512-1295-4272-9138-f99709370657 --- firmware/powermgmt.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/firmware/powermgmt.c b/firmware/powermgmt.c index ae8b7445a8..2e08f0a6ff 100644 --- a/firmware/powermgmt.c +++ b/firmware/powermgmt.c @@ -381,14 +381,20 @@ static void power_thread(void) /* LED always on or LED on when charger connected */ current += CURRENT_BACKLIGHT; powermgmt_est_runningtime_min = battery_level() * battery_capacity / 100 * 60 / current; +#if MEM == 8 /* assuming 192 kbps, the running time is 22% longer with 8MB */ + powermgmt_est_runningtime_min = powermgmt_est_runningtime_min * 122 / 100; +#endif /* MEM == 8 */ } #else current = usb_inserted() ? CURRENT_USB : CURRENT_NORMAL; if (backlight_get_timeout() == 1) /* LED always on */ current += CURRENT_BACKLIGHT; powermgmt_est_runningtime_min = battery_level() * battery_capacity / 100 * 60 / current; -#endif - +#if MEM == 8 /* assuming 192 kbps, the running time is 22% longer with 8MB */ + powermgmt_est_runningtime_min = powermgmt_est_runningtime_min * 122 / 100; +#endif /* MEM == 8 */ +#endif /* HAVE_CHARGE_CONTROL */ + #ifdef HAVE_CHARGE_CTRL if (charge_pause > 0) @@ -587,6 +593,9 @@ void power_init(void) battery_level_update(); /* calculate the remaining time to that the info screen displays something useful */ powermgmt_est_runningtime_min = battery_level() * battery_capacity / 100 * 60 / CURRENT_NORMAL; +#if MEM == 8 /* assuming 192 kbps, the running time is 22% longer with 8MB */ + powermgmt_est_runningtime_min = powermgmt_est_runningtime_min * 122 / 100; +#endif #ifdef HAVE_CHARGE_CTRL snprintf(power_message, POWER_MESSAGE_LEN, "Powermgmt started"); -- cgit v1.2.3