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.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index 77ebe019f8..880f545d52 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -903,9 +903,12 @@ bool view_battery(void)
903 y = (adc_read(ADC_UNREG_POWER) * BATTERY_SCALE_FACTOR) / 10000; 903 y = (adc_read(ADC_UNREG_POWER) * BATTERY_SCALE_FACTOR) / 10000;
904 snprintf(buf, 30, "Battery: %d.%02d V", y / 100, y % 100); 904 snprintf(buf, 30, "Battery: %d.%02d V", y / 100, y % 100);
905 lcd_puts(0, 1, buf); 905 lcd_puts(0, 1, buf);
906#ifdef ADC_EXT_POWER
906 y = (adc_read(ADC_EXT_POWER) * EXT_SCALE_FACTOR) / 10000; 907 y = (adc_read(ADC_EXT_POWER) * EXT_SCALE_FACTOR) / 10000;
907 snprintf(buf, 30, "External: %d.%02d V", y / 100, y % 100); 908 snprintf(buf, 30, "External: %d.%02d V", y / 100, y % 100);
908 lcd_puts(0, 2, buf); 909 lcd_puts(0, 2, buf);
910#endif
911#ifdef HAVE_CHARGING
909 snprintf(buf, 30, "Charger: %s", 912 snprintf(buf, 30, "Charger: %s",
910 charger_inserted() ? "present" : "absent"); 913 charger_inserted() ? "present" : "absent");
911 lcd_puts(0, 3, buf); 914 lcd_puts(0, 3, buf);
@@ -914,6 +917,7 @@ bool view_battery(void)
914 charger_enabled ? "yes" : "no"); 917 charger_enabled ? "yes" : "no");
915 lcd_puts(0, 4, buf); 918 lcd_puts(0, 4, buf);
916#endif 919#endif
920#endif
917 y = ( power_history[POWER_HISTORY_LEN-1] * 100 921 y = ( power_history[POWER_HISTORY_LEN-1] * 100
918 + power_history[POWER_HISTORY_LEN-2] * 100 922 + power_history[POWER_HISTORY_LEN-2] * 100
919 - power_history[POWER_HISTORY_LEN-1-CHARGE_END_NEGD+1] * 100 923 - power_history[POWER_HISTORY_LEN-1-CHARGE_END_NEGD+1] * 100