summaryrefslogtreecommitdiff
path: root/apps/debug_menu.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/debug_menu.c')
-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 cc1ca2ccda..c557129f86 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -507,15 +507,19 @@ void view_battery(void)
507 lcd_puts(0, 4, buf); 507 lcd_puts(0, 4, buf);
508#endif 508#endif
509 y = ( power_history[POWER_HISTORY_LEN-1] * 100 509 y = ( power_history[POWER_HISTORY_LEN-1] * 100
510 + power_history[POWER_HISTORY_LEN-2] * 100
511 - power_history[POWER_HISTORY_LEN-1-CHARGE_END_NEGD+1] * 100
510 - power_history[POWER_HISTORY_LEN-1-CHARGE_END_NEGD] * 100 ) 512 - power_history[POWER_HISTORY_LEN-1-CHARGE_END_NEGD] * 100 )
511 / CHARGE_END_NEGD; 513 / CHARGE_END_NEGD / 2;
512 514
513 snprintf(buf, 30, "short delta: %d", y); 515 snprintf(buf, 30, "short delta: %d", y);
514 lcd_puts(0, 5, buf); 516 lcd_puts(0, 5, buf);
515 517
516 y = ( power_history[POWER_HISTORY_LEN-1] * 100 518 y = ( power_history[POWER_HISTORY_LEN-1] * 100
519 + power_history[POWER_HISTORY_LEN-2] * 100
520 - power_history[POWER_HISTORY_LEN-1-CHARGE_END_ZEROD+1] * 100
517 - power_history[POWER_HISTORY_LEN-1-CHARGE_END_ZEROD] * 100 ) 521 - power_history[POWER_HISTORY_LEN-1-CHARGE_END_ZEROD] * 100 )
518 / CHARGE_END_ZEROD; 522 / CHARGE_END_ZEROD / 2;
519 523
520 snprintf(buf, 30, "long delta: %d", y); 524 snprintf(buf, 30, "long delta: %d", y);
521 lcd_puts(0, 6, buf); 525 lcd_puts(0, 6, buf);