Do not warn what we are correcting energy-full when there is no data to copy

This commit is contained in:
Richard Hughes 2010-03-26 11:16:39 +00:00
parent c30d15d9b9
commit daa2d5f3b7

View file

@ -484,7 +484,7 @@ up_device_supply_refresh_battery (UpDeviceSupply *supply)
energy_full, energy_full_design);
/* some systems don't have this */
if (energy_full < 0.01) {
if (energy_full < 0.01 && energy_full_design > 0.01) {
egg_warning ("correcting energy_full (%f) using energy_full_design (%f)",
energy_full, energy_full_design);
energy_full = energy_full_design;