diff --git a/src/modules/battery/e_mod_main.c b/src/modules/battery/e_mod_main.c index beac7fa2e..2c747b4dd 100644 --- a/src/modules/battery/e_mod_main.c +++ b/src/modules/battery/e_mod_main.c @@ -323,7 +323,11 @@ _battery_device_update(void) return; /* not ready yet, no properties received for any battery */ if (batnum > 0) full /= batnum; - + if ((full == 100) && have_power) + { + time_left = -1; + time_full = -1; + } if (time_left < 1) time_left = -1; if (time_full < 1) time_full = -1; diff --git a/src/modules/battery/e_mod_udev.c b/src/modules/battery/e_mod_udev.c index be0f3ab20..73e8dc72c 100644 --- a/src/modules/battery/e_mod_udev.c +++ b/src/modules/battery/e_mod_udev.c @@ -213,8 +213,8 @@ _battery_udev_battery_update(const char *syspath, Battery *bat) GET_STR(bat, model, POWER_SUPPLY_MODEL_NAME); GET_STR(bat, vendor, POWER_SUPPLY_MANUFACTURER); GET_NUM(bat, design_charge, POWER_SUPPLY_ENERGY_FULL_DESIGN); - GET_NUM(bat, last_full_charge, POWER_SUPPLY_ENERGY_FULL); } + GET_NUM(bat, last_full_charge, POWER_SUPPLY_ENERGY_FULL); test = eeze_udev_syspath_get_property(bat->udi, "POWER_SUPPLY_ENERGY_NOW"); if (test) {