diff options
Diffstat (limited to 'firmware/export/powermgmt.h')
-rw-r--r-- | firmware/export/powermgmt.h | 7 |
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 | |||
118 | int _battery_level(void); /* percent */ | 123 | int _battery_level(void); /* percent */ |
119 | int _battery_time(void); /* minutes */ | 124 | int _battery_time(void); /* minutes */ |
120 | int _battery_voltage(void); /* voltage in millivolts */ | 125 | int _battery_voltage(void); /* voltage in millivolts */ |
126 | int _battery_current(void); /* (dis)charge current in milliamps */ | ||
127 | |||
121 | #if CONFIG_CHARGING >= CHARGING_TARGET | 128 | #if CONFIG_CHARGING >= CHARGING_TARGET |
122 | void powermgmt_init_target(void); | 129 | void powermgmt_init_target(void); |
123 | void charging_algorithm_close(void); | 130 | void charging_algorithm_close(void); |