aboutsummaryrefslogtreecommitdiff
path: root/scripts/build-all.py
diff options
context:
space:
mode:
authorXiaozhe Shi <xiaozhes@codeaurora.org>2013-09-23 15:50:53 -0700
committerXiaozhe Shi <xiaozhes@codeaurora.org>2013-09-30 14:50:27 -0700
commita2f7217450da3f1d9a99a3bb0e2425961865a99d (patch)
tree8bb48dac7cf8f9c8271d059d86aee90b7ff7309c /scripts/build-all.py
parent546d84cd539f241f5b79ada3652851fb40238cc3 (diff)
power: qpnp-bms: fix boot time iavg calculation algorithm
A bug was introduced in the unusable charge calculation algorithm when the shutdown SoC and IAVG was refactored. Since the BMS driver will try to do a SoC calculation before the shutdown data was loaded, the shutdown IAVG never gets used to populate the IAVG sample array. This causes the shutdown IAVG to never get used by the BMS driver, creating a situation where the high boot time current fills the IAVG samples array and skewing UUC to be much higher than it should be. Fix this by moving the first time calculation flag for UUC to the end of the SoC calculation function so that only the first real SoC calculation after shutdown data is loaded clears the flag. Also, add a delta time check in the UUC iavg sample array aggregation so that recalculating SoC many times will not incorrectly skew the IAVG and cause a incorrectly high UUC. Change-Id: Ida355c64e60167e0a11dcbb587585273924c9da1 Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
Diffstat (limited to 'scripts/build-all.py')
0 files changed, 0 insertions, 0 deletions