summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUwe Freese <thebreaker@rockbox.org>2003-03-03 13:23:11 +0000
committerUwe Freese <thebreaker@rockbox.org>2003-03-03 13:23:11 +0000
commit63e97b66e04e34b39e525168577ed3908466d5ee (patch)
treec2a19dac9e8174e0268782ce470ee34b466c2f5e
parent4846ce8654a4f0a857718905882420aa2ced54e9 (diff)
downloadrockbox-63e97b66e04e34b39e525168577ed3908466d5ee.tar.gz
rockbox-63e97b66e04e34b39e525168577ed3908466d5ee.zip
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
-rw-r--r--firmware/powermgmt.c13
1 files 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)
381 /* LED always on or LED on when charger connected */ 381 /* LED always on or LED on when charger connected */
382 current += CURRENT_BACKLIGHT; 382 current += CURRENT_BACKLIGHT;
383 powermgmt_est_runningtime_min = battery_level() * battery_capacity / 100 * 60 / current; 383 powermgmt_est_runningtime_min = battery_level() * battery_capacity / 100 * 60 / current;
384#if MEM == 8 /* assuming 192 kbps, the running time is 22% longer with 8MB */
385 powermgmt_est_runningtime_min = powermgmt_est_runningtime_min * 122 / 100;
386#endif /* MEM == 8 */
384 } 387 }
385#else 388#else
386 current = usb_inserted() ? CURRENT_USB : CURRENT_NORMAL; 389 current = usb_inserted() ? CURRENT_USB : CURRENT_NORMAL;
387 if (backlight_get_timeout() == 1) /* LED always on */ 390 if (backlight_get_timeout() == 1) /* LED always on */
388 current += CURRENT_BACKLIGHT; 391 current += CURRENT_BACKLIGHT;
389 powermgmt_est_runningtime_min = battery_level() * battery_capacity / 100 * 60 / current; 392 powermgmt_est_runningtime_min = battery_level() * battery_capacity / 100 * 60 / current;
390#endif 393#if MEM == 8 /* assuming 192 kbps, the running time is 22% longer with 8MB */
391 394 powermgmt_est_runningtime_min = powermgmt_est_runningtime_min * 122 / 100;
395#endif /* MEM == 8 */
396#endif /* HAVE_CHARGE_CONTROL */
397
392#ifdef HAVE_CHARGE_CTRL 398#ifdef HAVE_CHARGE_CTRL
393 399
394 if (charge_pause > 0) 400 if (charge_pause > 0)
@@ -587,6 +593,9 @@ void power_init(void)
587 battery_level_update(); 593 battery_level_update();
588 /* calculate the remaining time to that the info screen displays something useful */ 594 /* calculate the remaining time to that the info screen displays something useful */
589 powermgmt_est_runningtime_min = battery_level() * battery_capacity / 100 * 60 / CURRENT_NORMAL; 595 powermgmt_est_runningtime_min = battery_level() * battery_capacity / 100 * 60 / CURRENT_NORMAL;
596#if MEM == 8 /* assuming 192 kbps, the running time is 22% longer with 8MB */
597 powermgmt_est_runningtime_min = powermgmt_est_runningtime_min * 122 / 100;
598#endif
590 599
591#ifdef HAVE_CHARGE_CTRL 600#ifdef HAVE_CHARGE_CTRL
592 snprintf(power_message, POWER_MESSAGE_LEN, "Powermgmt started"); 601 snprintf(power_message, POWER_MESSAGE_LEN, "Powermgmt started");