diff options
author | Todd Poynor <toddpoynor@google.com> | 2013-08-09 12:22:07 -0700 |
---|---|---|
committer | Todd Poynor <toddpoynor@google.com> | 2013-08-09 21:52:25 +0000 |
commit | 57fd0989cbb59f305514378e511e36c752b5aa20 (patch) | |
tree | 88e5a62e6644e7a8c1e4047170df0a3f6b3e4a3e /healthd/BatteryMonitor.cpp | |
parent | dfe0cbab3f9039f34af1dc9e31faf8155737ec2d (diff) | |
download | system_core-57fd0989cbb59f305514378e511e36c752b5aa20.tar.gz system_core-57fd0989cbb59f305514378e511e36c752b5aa20.tar.bz2 system_core-57fd0989cbb59f305514378e511e36c752b5aa20.zip |
healthd: preserve uA and uAh units for current_now and charge_counter
Change-Id: I20b3f47c541c4321b0593e504090ad6573b9cb01
Diffstat (limited to 'healthd/BatteryMonitor.cpp')
-rw-r--r-- | healthd/BatteryMonitor.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/healthd/BatteryMonitor.cpp b/healthd/BatteryMonitor.cpp index 8492dce59..8ff53575b 100644 --- a/healthd/BatteryMonitor.cpp +++ b/healthd/BatteryMonitor.cpp @@ -190,10 +190,10 @@ bool BatteryMonitor::update(void) { props.batteryVoltage = getIntField(mBatteryVoltagePath) / 1000; if (!mBatteryCurrentNowPath.isEmpty()) - props.batteryCurrentNow = getIntField(mBatteryCurrentNowPath) / 1000; + props.batteryCurrentNow = getIntField(mBatteryCurrentNowPath); if (!mBatteryChargeCounterPath.isEmpty()) - props.batteryChargeCounter = getIntField(mBatteryChargeCounterPath) / 1000; + props.batteryChargeCounter = getIntField(mBatteryChargeCounterPath); props.batteryTemperature = getIntField(mBatteryTemperaturePath); @@ -255,7 +255,7 @@ bool BatteryMonitor::update(void) { if (!mBatteryCurrentNowPath.isEmpty()) { char b[20]; - snprintf(b, sizeof(b), " c=%d", props.batteryCurrentNow); + snprintf(b, sizeof(b), " c=%d", props.batteryCurrentNow / 1000); strlcat(dmesgline, b, sizeof(dmesgline)); } |