Ooops incorrect comparison

This commit is contained in:
Albert Vaca 2013-11-18 02:32:42 +01:00
parent 553a6c518e
commit 1bc4fcfa23

View file

@ -62,7 +62,7 @@ bool BatteryPlugin::receivePackage(const NetworkPackage& np)
int currentCharge = np.get<int>("currentCharge");
int thresholdEvent = np.get<int>("thresholdEvent", (int)ThresholdNone);
if (batteryDbusInterface->isCharging() != currentCharge
if (batteryDbusInterface->charge() != currentCharge
|| batteryDbusInterface->isCharging() != isCharging
) {
batteryDbusInterface->updateValues(isCharging, currentCharge);