diff options
-rw-r--r-- | src/linux/up-device-supply.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/linux/up-device-supply.c b/src/linux/up-device-supply.c index efeb856..d06da1d 100644 --- a/src/linux/up-device-supply.c +++ b/src/linux/up-device-supply.c @@ -567,13 +567,13 @@ up_device_supply_refresh_battery (UpDeviceSupply *supply) energy *= voltage_design; } - charge_full = sysfs_get_double (native_path, "charge_full") / 1000000.0; - if (charge_full == 0) - charge_full = sysfs_get_double (native_path, "charge_full_design") / 1000000.0; + charge_full = sysfs_get_double (native_path, "charge_full") / 1000000.0; + if (charge_full == 0) + charge_full = sysfs_get_double (native_path, "charge_full_design") / 1000000.0; - /* If charge_full exists, then current_now is always reported in uA. - * In the legacy case, where energy only units exist, and power_now isn't present - * current_now is power in uW. */ + /* If charge_full exists, then current_now is always reported in uA. + * In the legacy case, where energy only units exist, and power_now isn't present + * current_now is power in uW. */ energy_rate = fabs (sysfs_get_double (native_path, "current_now") / 1000000.0); if (charge_full != 0) energy_rate *= voltage_design; |