summaryrefslogtreecommitdiffstats
path: root/firmware/target
diff options
context:
space:
mode:
authorAidan MacDonald <amachronic@protonmail.com>2021-12-11 16:18:30 +0000
committerAidan MacDonald <amachronic@protonmail.com>2021-12-23 11:40:22 +0000
commit22d0c4da7085610136939ffe82bb3877a4fd8d5b (patch)
treef45d267c37796e83c73449fa4708e219e193bb16 /firmware/target
parent1a313dc9bff109d155e35bac79c475ea65198aea (diff)
downloadrockbox-22d0c4da7085610136939ffe82bb3877a4fd8d5b.tar.gz
rockbox-22d0c4da7085610136939ffe82bb3877a4fd8d5b.zip
Revert "powermgmt: Remove an unnecessary function"
This reverts commit 6ff1a935b923b69d34d18e68af612297912c806b. Reason: it created a mismatch between the displayed voltage and percent since the voltage was unfiltered but percentage was based off the filtered voltage. Change-Id: I4cba099f2e1edf0ef7c4e17a32f566aa66f5b933
Diffstat (limited to 'firmware/target')
-rw-r--r--firmware/target/coldfire/debug-coldfire.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/firmware/target/coldfire/debug-coldfire.c b/firmware/target/coldfire/debug-coldfire.c
index 56f1bbe1a7..ef44a82176 100644
--- a/firmware/target/coldfire/debug-coldfire.c
+++ b/firmware/target/coldfire/debug-coldfire.c
@@ -144,7 +144,7 @@ bool dbg_ports(void)
adc_buttons = adc_read(ADC_BUTTONS);
adc_remote = adc_read(ADC_REMOTE);
-
+ battery_read_info(&adc_battery_voltage, &adc_battery_level);
#if defined(IAUDIO_X5) || defined(IAUDIO_M5) || defined(IRIVER_H300_SERIES)
lcd_putsf(0, line++, "ADC_BUTTONS (%c): %02x",
button_scan_enabled() ? '+' : '-', adc_buttons);
@@ -162,8 +162,7 @@ bool dbg_ports(void)
adc_read(ADC_REMOTEDETECT));
#endif
- adc_battery_voltage = _battery_voltage();
- adc_battery_level = battery_level();
+ battery_read_info(&adc_battery_voltage, &adc_battery_level);
lcd_putsf(0, line++, "Batt: %d.%03dV %d%% ", adc_battery_voltage / 1000,
adc_battery_voltage % 1000, adc_battery_level);