summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorHeikki Hannikainen <hessuh@rockbox.org>2002-08-12 12:21:22 +0000
committerHeikki Hannikainen <hessuh@rockbox.org>2002-08-12 12:21:22 +0000
commitcccb8d0a644e40e03665ab68342fc73296a0f7a4 (patch)
treeac73cdaa0402599e856eba32c4c28adea2917be9 /apps
parenta4cb4aff7ba5546183e221687830f4d72abb8512 (diff)
downloadrockbox-cccb8d0a644e40e03665ab68342fc73296a0f7a4.tar.gz
rockbox-cccb8d0a644e40e03665ab68342fc73296a0f7a4.zip
Sync the charger debug view of deltas with the charger code.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1683 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/debug_menu.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index 0a2e4be0f3..cc1ca2ccda 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -506,20 +506,16 @@ void view_battery(void)
506 charger_enabled ? "yes" : "no"); 506 charger_enabled ? "yes" : "no");
507 lcd_puts(0, 4, buf); 507 lcd_puts(0, 4, buf);
508#endif 508#endif
509 y = 0; 509 y = ( power_history[POWER_HISTORY_LEN-1] * 100
510 for (i = 0; i < CHARGE_END_NEGD; i++) 510 - power_history[POWER_HISTORY_LEN-1-CHARGE_END_NEGD] * 100 )
511 y += power_history[POWER_HISTORY_LEN-1-i]*100 - 511 / CHARGE_END_NEGD;
512 power_history[POWER_HISTORY_LEN-1-i-1]*100;
513 y = y / CHARGE_END_NEGD;
514 512
515 snprintf(buf, 30, "short delta: %d", y); 513 snprintf(buf, 30, "short delta: %d", y);
516 lcd_puts(0, 5, buf); 514 lcd_puts(0, 5, buf);
517 515
518 y = 0; 516 y = ( power_history[POWER_HISTORY_LEN-1] * 100
519 for (i = 0; i < CHARGE_END_ZEROD; i++) 517 - power_history[POWER_HISTORY_LEN-1-CHARGE_END_ZEROD] * 100 )
520 y += power_history[POWER_HISTORY_LEN-1-i]*100 - 518 / CHARGE_END_ZEROD;
521 power_history[POWER_HISTORY_LEN-1-i-1]*100;
522 y = y / CHARGE_END_ZEROD;
523 519
524 snprintf(buf, 30, "long delta: %d", y); 520 snprintf(buf, 30, "long delta: %d", y);
525 lcd_puts(0, 6, buf); 521 lcd_puts(0, 6, buf);
@@ -546,7 +542,7 @@ void view_battery(void)
546 542
547 lcd_update(); 543 lcd_update();
548 sleep(HZ/2); 544 sleep(HZ/2);
549 545
550 switch(button_get(false)) 546 switch(button_get(false))
551 { 547 {
552 case BUTTON_UP: 548 case BUTTON_UP: