Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
upower battery detection fix
Signed-off-by: Tom Swindell <t.swindell@rubyx.co.uk>
  • Loading branch information
Tom Swindell committed Jan 23, 2014
1 parent 8979092 commit 07ab3fc
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/upower/provider_upower.cpp
Expand Up @@ -87,9 +87,7 @@ 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
&& p->energyFull() > 0
&& p->voltage() > 0);
return ((DeviceType)p->type() == Battery);
};
std::unique_ptr<Device> device(new Device(service_name, path, bus_));
if (!is_battery(device))
Expand Down

0 comments on commit 07ab3fc

Please sign in to comment.