summaryrefslogtreecommitdiff
path: root/firmware/export/powermgmt.h
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/powermgmt.h
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/powermgmt.h')
-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;
95#endif 95#endif
96 96
97#ifndef BATT_CURRENT_AVE_SAMPLES 97#ifndef BATT_CURRENT_AVE_SAMPLES
98/* TODO may need tweaking */ 98/* semi arbitrary but needs to be 'large' for the time estimation algorithm */
99#define BATT_CURRENT_AVE_SAMPLES 16 99#define BATT_CURRENT_AVE_SAMPLES 128
100#endif 100#endif
101 101
102#ifndef POWER_THREAD_STEP_TICKS 102#ifndef POWER_THREAD_STEP_TICKS