Added missing ampere to watt conversion for last full capacity. (#158)
Signed-off-by: Tomasz Nitecki <tnnn@tnnn.pl>
This commit is contained in:
parent
08ee3bdf2d
commit
a2fd4bd074
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user