summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortnnn <tnnn@users.noreply.github.com>2016-08-21 22:11:19 +0200
committerMichael Stapelberg <stapelberg@users.noreply.github.com>2016-08-21 13:11:19 -0700
commita2fd4bd07424a1df80c5ee7bc9f958e4ab6bafcd (patch)
tree8306e0899bf44bd0791758f4e9c77f2483fec4f7 /src
parent08ee3bdf2d4d8bd8efaf716d514a08d8a1014497 (diff)
Added missing ampere to watt conversion for last full capacity. (#158)
Signed-off-by: Tomasz Nitecki <tnnn@tnnn.pl>
Diffstat (limited to 'src')
-rw-r--r--src/print_battery_info.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/print_battery_info.c b/src/print_battery_info.c
index c7948d0..c20e87e 100644
--- a/src/print_battery_info.c
+++ b/src/print_battery_info.c
@@ -105,6 +105,7 @@ static bool slurp_battery_info(struct battery_info *batt_info, yajl_gen json_gen
batt_info->present_rate = (((float)voltage / 1000.0) * ((float)batt_info->present_rate / 1000.0));
batt_info->remaining = (((float)voltage / 1000.0) * ((float)batt_info->remaining / 1000.0));
batt_info->full_design = (((float)voltage / 1000.0) * ((float)batt_info->full_design / 1000.0));
+ batt_info->full_last = (((float)voltage / 1000.0) * ((float)batt_info->full_last / 1000.0));
}
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
int state;
@@ -307,6 +308,7 @@ static bool slurp_battery_info(struct battery_info *batt_info, yajl_gen json_gen
batt_info->present_rate = (((float)voltage / 1000.0) * ((float)batt_info->present_rate / 1000.0));
batt_info->remaining = (((float)voltage / 1000.0) * ((float)batt_info->remaining / 1000.0));
batt_info->full_design = (((float)voltage / 1000.0) * ((float)batt_info->full_design / 1000.0));
+ batt_info->full_last = (((float)voltage / 1000.0) * ((float)batt_info->full_last / 1000.0));
}
if (is_full)