summaryrefslogtreecommitdiff
path: root/firmware/export/powermgmt.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/export/powermgmt.h')
-rw-r--r--firmware/export/powermgmt.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/firmware/export/powermgmt.h b/firmware/export/powermgmt.h
index c6fc3d5bdf..9d4d4e06aa 100644
--- a/firmware/export/powermgmt.h
+++ b/firmware/export/powermgmt.h
@@ -94,6 +94,11 @@ void powermgmt_init(void) INIT_ATTR;
94#define BATT_AVE_SAMPLES 128 94#define BATT_AVE_SAMPLES 128
95#endif 95#endif
96 96
97#ifndef BATT_CURRENT_AVE_SAMPLES
98/* TODO may need tweaking */
99#define BATT_CURRENT_AVE_SAMPLES 16
100#endif
101
97#ifndef POWER_THREAD_STEP_TICKS 102#ifndef POWER_THREAD_STEP_TICKS
98/* 2HZ sample rate unless otherwise specified */ 103/* 2HZ sample rate unless otherwise specified */
99#define POWER_THREAD_STEP_TICKS (HZ/2) 104#define POWER_THREAD_STEP_TICKS (HZ/2)
@@ -118,6 +123,8 @@ int battery_current(void); /* battery current in milliamps
118int _battery_level(void); /* percent */ 123int _battery_level(void); /* percent */
119int _battery_time(void); /* minutes */ 124int _battery_time(void); /* minutes */
120int _battery_voltage(void); /* voltage in millivolts */ 125int _battery_voltage(void); /* voltage in millivolts */
126int _battery_current(void); /* (dis)charge current in milliamps */
127
121#if CONFIG_CHARGING >= CHARGING_TARGET 128#if CONFIG_CHARGING >= CHARGING_TARGET
122void powermgmt_init_target(void); 129void powermgmt_init_target(void);
123void charging_algorithm_close(void); 130void charging_algorithm_close(void);