summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeikki Hannikainen <hessuh@rockbox.org>2002-08-20 13:38:14 +0000
committerHeikki Hannikainen <hessuh@rockbox.org>2002-08-20 13:38:14 +0000
commit3c10db57c6963f49a9238b0e7e9db259e72cd684 (patch)
treed0648ea72b2d7f8222b30d33cda8e0de4bd76ef0
parent97e4a8fbef15bab72dae1f3253a9fb489794485e (diff)
downloadrockbox-3c10db57c6963f49a9238b0e7e9db259e72cd684.tar.gz
rockbox-3c10db57c6963f49a9238b0e7e9db259e72cd684.zip
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
-rw-r--r--apps/debug_menu.c8
1 files 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)
501 lcd_puts(0, 4, buf); 501 lcd_puts(0, 4, buf);
502#endif 502#endif
503 y = ( power_history[POWER_HISTORY_LEN-1] * 100 503 y = ( power_history[POWER_HISTORY_LEN-1] * 100
504 + power_history[POWER_HISTORY_LEN-2] * 100
505 - power_history[POWER_HISTORY_LEN-1-CHARGE_END_NEGD+1] * 100
504 - power_history[POWER_HISTORY_LEN-1-CHARGE_END_NEGD] * 100 ) 506 - power_history[POWER_HISTORY_LEN-1-CHARGE_END_NEGD] * 100 )
505 / CHARGE_END_NEGD; 507 / CHARGE_END_NEGD / 2;
506 508
507 snprintf(buf, 30, "short delta: %d", y); 509 snprintf(buf, 30, "short delta: %d", y);
508 lcd_puts(0, 5, buf); 510 lcd_puts(0, 5, buf);
509 511
510 y = ( power_history[POWER_HISTORY_LEN-1] * 100 512 y = ( power_history[POWER_HISTORY_LEN-1] * 100
513 + power_history[POWER_HISTORY_LEN-2] * 100
514 - power_history[POWER_HISTORY_LEN-1-CHARGE_END_ZEROD+1] * 100
511 - power_history[POWER_HISTORY_LEN-1-CHARGE_END_ZEROD] * 100 ) 515 - power_history[POWER_HISTORY_LEN-1-CHARGE_END_ZEROD] * 100 )
512 / CHARGE_END_ZEROD; 516 / CHARGE_END_ZEROD / 2;
513 517
514 snprintf(buf, 30, "long delta: %d", y); 518 snprintf(buf, 30, "long delta: %d", y);
515 lcd_puts(0, 6, buf); 519 lcd_puts(0, 6, buf);