From f2314de0b105a510f9f3a6a1d70873b0f103a95f Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Thu, 3 Nov 2005 21:21:37 +0000 Subject: [PATCH] Recorder v1: removed duplicate battery debug code. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7745 a1c6a512-1295-4272-9138-f99709370657 --- apps/debug_menu.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/apps/debug_menu.c b/apps/debug_menu.c index 6b6b1f5a05..71de023408 100644 --- a/apps/debug_menu.c +++ b/apps/debug_menu.c @@ -1205,7 +1205,7 @@ bool view_battery(void) case 1: /* status: */ lcd_clear_display(); lcd_puts(0, 0, "Power status:"); - + y = (adc_read(ADC_UNREG_POWER) * BATTERY_SCALE_FACTOR) / 10000; snprintf(buf, 30, "Battery: %d.%02d V", y / 100, y % 100); lcd_puts(0, 1, buf); @@ -1215,10 +1215,6 @@ bool view_battery(void) lcd_puts(0, 2, buf); #endif #ifdef HAVE_CHARGING - snprintf(buf, 30, "Charger: %s", - charger_inserted() ? "present" : "absent"); - lcd_puts(0, 3, buf); -#endif #ifdef HAVE_CHARGE_CTRL snprintf(buf, 30, "Chgr: %s %s", charger_inserted() ? "present" : "absent", @@ -1229,7 +1225,12 @@ bool view_battery(void) snprintf(buf, 30, "long delta: %d", long_delta); lcd_puts(0, 6, buf); lcd_puts(0, 7, power_message); -#endif /* HAVE_CHARGE_CTRL */ +#else /* !HAVE_CHARGE_CTRL */ + snprintf(buf, 30, "Charger: %s", + charger_inserted() ? "present" : "absent"); + lcd_puts(0, 3, buf); +#endif /* !HAVE_CHARGE_CTRL */ +#endif /* HAVE_CHARGING */ break; case 2: /* voltage deltas: */