summaryrefslogtreecommitdiffstats
path: root/firmware/export
diff options
context:
space:
mode:
authorAidan MacDonald <amachronic@protonmail.com>2021-12-23 02:49:50 +0000
committerAidan MacDonald <amachronic@protonmail.com>2021-12-28 10:47:40 -0500
commit96cfe329a612a8da5878f7bc20f2d645b30553a3 (patch)
tree61527d8c279719d94246fc37971d8bab6148ff8c /firmware/export
parent90dd2f84a9174c38dbfb07d582ec6ee7697b1939 (diff)
downloadrockbox-96cfe329a612a8da5878f7bc20f2d645b30553a3.tar.gz
rockbox-96cfe329a612a8da5878f7bc20f2d645b30553a3.zip
powermgmt: Better time estimation
This method, while far from perfect, is able to make use of real-time battery usage information and updates frequently in fine-grained increments. This should make time estimates a lot more useful than they previously were. Change-Id: I66c6daba88210f60a27e239fbbcc56869be3b878
Diffstat (limited to 'firmware/export')
-rw-r--r--firmware/export/powermgmt.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/firmware/export/powermgmt.h b/firmware/export/powermgmt.h
index 77177e61af..3095d2c97b 100644
--- a/firmware/export/powermgmt.h
+++ b/firmware/export/powermgmt.h
@@ -95,8 +95,8 @@ void powermgmt_init(void) INIT_ATTR;
#endif
#ifndef BATT_CURRENT_AVE_SAMPLES
-/* TODO may need tweaking */
-#define BATT_CURRENT_AVE_SAMPLES 16
+/* semi arbitrary but needs to be 'large' for the time estimation algorithm */
+#define BATT_CURRENT_AVE_SAMPLES 128
#endif
#ifndef POWER_THREAD_STEP_TICKS