diff options
| author | Jörg Hohensohn <hohensoh@rockbox.org> | 2003-12-03 07:05:13 +0000 |
|---|---|---|
| committer | Jörg Hohensohn <hohensoh@rockbox.org> | 2003-12-03 07:05:13 +0000 |
| commit | eb28d43cd7a140768207f8f270052072e440345c (patch) | |
| tree | 7b7a5d1401422f0de1a63ac07069114c15b309c2 | |
| parent | 44298163ba2afb0d5506b67e163a655c44506295 (diff) | |
| download | rockbox-eb28d43cd7a140768207f8f270052072e440345c.zip rockbox-eb28d43cd7a140768207f8f270052072e440345c.tar.gz rockbox-eb28d43cd7a140768207f8f270052072e440345c.tar.bz2 rockbox-eb28d43cd7a140768207f8f270052072e440345c.tar.xz | |
for FM and V2: removed the now false voltage reading from charging screen.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4096 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | apps/screens.c | 23 | ||||
| -rw-r--r-- | firmware/export/config-fmrecorder.h | 3 | ||||
| -rw-r--r-- | firmware/export/config-recorderv2.h | 3 |
3 files changed, 21 insertions, 8 deletions
diff --git a/apps/screens.c b/apps/screens.c index 7f637b1..32e6936 100644 --- a/apps/screens.c +++ b/apps/screens.c @@ -140,17 +140,24 @@ void charging_display_info(bool animate) const int pox_y = 32; static unsigned phase = 3; unsigned i; - int battery_voltage; - int batt_int, batt_frac; char buf[32]; + (void)buf; - battery_voltage = (adc_read(ADC_UNREG_POWER) * BATTERY_SCALE_FACTOR) / 10000; - batt_int = battery_voltage / 100; - batt_frac = battery_voltage % 100; +#ifdef NEED_ATA_POWER_BATT_MEASURE + if (ide_powered()) /* FM and V2 can only measure when ATA power is on */ +#endif + { + int battery_voltage; + int batt_int, batt_frac; - snprintf(buf, 32, " Batt: %d.%02dV %d%% ", batt_int, batt_frac, - battery_level()); - lcd_puts(0, 7, buf); + battery_voltage = (adc_read(ADC_UNREG_POWER) * BATTERY_SCALE_FACTOR) / 10000; + batt_int = battery_voltage / 100; + batt_frac = battery_voltage % 100; + + snprintf(buf, 32, " Batt: %d.%02dV %d%% ", batt_int, batt_frac, + battery_level()); + lcd_puts(0, 7, buf); + } #ifdef HAVE_CHARGE_CTRL diff --git a/firmware/export/config-fmrecorder.h b/firmware/export/config-fmrecorder.h index 264f998..d7e6c8f 100644 --- a/firmware/export/config-fmrecorder.h +++ b/firmware/export/config-fmrecorder.h @@ -22,6 +22,9 @@ /* Define this if you need to power on ATA */ #define NEEDS_ATA_POWER_ON +/* Define this if battery voltage can only be measured with ATA powered */ +#define NEED_ATA_POWER_BATT_MEASURE + /* Define this to the CPU frequency */ #define CPU_FREQ 11059200 diff --git a/firmware/export/config-recorderv2.h b/firmware/export/config-recorderv2.h index 264f998..d7e6c8f 100644 --- a/firmware/export/config-recorderv2.h +++ b/firmware/export/config-recorderv2.h @@ -22,6 +22,9 @@ /* Define this if you need to power on ATA */ #define NEEDS_ATA_POWER_ON +/* Define this if battery voltage can only be measured with ATA powered */ +#define NEED_ATA_POWER_BATT_MEASURE + /* Define this to the CPU frequency */ #define CPU_FREQ 11059200 |