Skip to content

Commit

Permalink
Revert "upower battery detection fix"
Browse files Browse the repository at this point in the history
This reverts commit 07ab3fc.
  • Loading branch information
siteshwar committed May 4, 2014
1 parent 0f3a7ca commit 6badb86
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/upower/provider_upower.cpp
Expand Up @@ -87,7 +87,9 @@ void Bridge::update_all_props()
bool Bridge::try_get_battery(QString const &path)
{
auto is_battery = [](std::unique_ptr<Device> const &p) {
return ((DeviceType)p->type() == Battery);
return ((DeviceType)p->type() == Battery
&& p->energyFull() > 0
&& p->voltage() > 0);
};
std::unique_ptr<Device> device(new Device(service_name, path, bus_));
if (!is_battery(device))
Expand Down

0 comments on commit 6badb86

Please sign in to comment.