PowerStatus: use the design capacity if needed.
* When the last full capacity is not available, use the design capacity of the battery instead.
This commit is contained in:
parent
85f43155fe
commit
2d9c195093
@ -109,6 +109,8 @@ Battery::GetBatteryInfoCached(battery_info* info)
|
||||
info->current_rate = fCachedInfo.current_rate;
|
||||
info->capacity = fCachedInfo.capacity;
|
||||
info->full_capacity = fExtendedBatteryInfo.last_full_charge;
|
||||
if (info->full_capacity < 0)
|
||||
info->full_capacity = fExtendedBatteryInfo.design_capacity;
|
||||
|
||||
fRateBuffer.AddRate(fCachedInfo.current_rate);
|
||||
if (fCachedInfo.current_rate > 0 && fRateBuffer.GetMeanRate() != 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user