From 3c10db57c6963f49a9238b0e7e9db259e72cd684 Mon Sep 17 00:00:00 2001 From: Heikki Hannikainen Date: Tue, 20 Aug 2002 13:38:14 +0000 Subject: Use same updated method for delta calculation as powermgmt.c uses (maybe it should go into a function after all). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1817 a1c6a512-1295-4272-9138-f99709370657 --- apps/debug_menu.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/debug_menu.c b/apps/debug_menu.c index 3d27e630b8..2670a45d96 100644 --- a/apps/debug_menu.c +++ b/apps/debug_menu.c @@ -501,15 +501,19 @@ void view_battery(void) lcd_puts(0, 4, buf); #endif y = ( power_history[POWER_HISTORY_LEN-1] * 100 + + power_history[POWER_HISTORY_LEN-2] * 100 + - power_history[POWER_HISTORY_LEN-1-CHARGE_END_NEGD+1] * 100 - power_history[POWER_HISTORY_LEN-1-CHARGE_END_NEGD] * 100 ) - / CHARGE_END_NEGD; + / CHARGE_END_NEGD / 2; snprintf(buf, 30, "short delta: %d", y); lcd_puts(0, 5, buf); y = ( power_history[POWER_HISTORY_LEN-1] * 100 + + power_history[POWER_HISTORY_LEN-2] * 100 + - power_history[POWER_HISTORY_LEN-1-CHARGE_END_ZEROD+1] * 100 - power_history[POWER_HISTORY_LEN-1-CHARGE_END_ZEROD] * 100 ) - / CHARGE_END_ZEROD; + / CHARGE_END_ZEROD / 2; snprintf(buf, 30, "long delta: %d", y); lcd_puts(0, 6, buf); -- cgit v1.2.3