Jeffy Chen 0ddaa7d9eb virtual_battery: Avoid unexpected batt_mode_cache refreshing
Currently we are assuming batt_mode would never be zero, but that is not
always true. Some battery do report zero for batt_mode(bob for example).

So everytime the batt_mode_cache been set to zero, the virtual_battery
would consider it uninited, and tries to refresh the next time.

Use -1 as uninited batt_mode_cache to avoid that.

BUG=b:66555246
BRANCH=gru
TEST=Check on bob, the battery level is correct.

Change-Id: Ieb7ec9403f69a6b5bca93c6682ec6117fe95fe1e
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Reviewed-on: https://chromium-review.googlesource.com/678135
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Philip Chen <philipchen@chromium.org>
Reviewed-by: Shawn N <shawnn@chromium.org>
2017-09-25 21:06:52 -07:00
2017-09-25 18:35:26 -07:00
2017-08-07 19:29:13 -07:00
2017-09-22 10:18:50 -07:00
2017-09-07 15:01:05 -07:00
2017-07-08 20:38:53 -07:00
2017-09-22 10:18:50 -07:00
2012-05-11 09:11:52 -07:00
2014-04-02 19:58:53 +00:00
2015-12-08 20:05:05 -08:00

For an overview of the Embedded Controller firmware, refer to

http://www.chromium.org/chromium-os/2014-firmware-summit

For instructions on building from source, refer to

http://www.chromium.org/chromium-os/ec-development/getting-started-building-ec-images-quickly
Description
No description provided
Readme 1.4 GiB
Languages
C 64.7%
Lasso 20.7%
ASL 3.6%
JavaScript 3.2%
C# 2.9%
Other 4.6%