From 96cfe329a612a8da5878f7bc20f2d645b30553a3 Mon Sep 17 00:00:00 2001 From: Aidan MacDonald Date: Thu, 23 Dec 2021 02:49:50 +0000 Subject: 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 --- firmware/export/powermgmt.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'firmware/export/powermgmt.h') 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 -- cgit v1.2.3