Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 57fd0989 authored by Todd Poynor's avatar Todd Poynor
Browse files

healthd: preserve uA and uAh units for current_now and charge_counter

Change-Id: I20b3f47c541c4321b0593e504090ad6573b9cb01
parent dfe0cbab
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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));
        }