summaryrefslogtreecommitdiffstats
path: root/tdecore/tdehw/tdehardwaredevices.cpp
diff options
context:
space:
mode:
authorFrancois Andriot <francois.andriot@free.fr>2013-08-17 19:48:14 -0500
committerDarrell Anderson <humanreadable@yahoo.com>2013-08-17 19:48:14 -0500
commit52b8aef9ccb7a752ee1d9d4ab83da20347b09322 (patch)
tree837754efe5633f854576ad1fd3ffc3dfef23625d /tdecore/tdehw/tdehardwaredevices.cpp
parent18ba4a49ac445909a21897e1da90af618a3004ad (diff)
downloadtdelibs-52b8aef9ccb7a752ee1d9d4ab83da20347b09322.tar.gz
tdelibs-52b8aef9ccb7a752ee1d9d4ab83da20347b09322.zip
Fix remaining battery time estimation.
This supports bug report 1514.
Diffstat (limited to 'tdecore/tdehw/tdehardwaredevices.cpp')
-rw-r--r--tdecore/tdehw/tdehardwaredevices.cpp17
1 files changed, 4 insertions, 13 deletions
diff --git a/tdecore/tdehw/tdehardwaredevices.cpp b/tdecore/tdehw/tdehardwaredevices.cpp
index 97d67178d..250cd11b6 100644
--- a/tdecore/tdehw/tdehardwaredevices.cpp
+++ b/tdecore/tdehw/tdehardwaredevices.cpp
@@ -2729,22 +2729,13 @@ void TDEHardwareDevices::updateExistingDeviceInformation(TDEGenericDevice* exist
if (nodename == "alarm") {
bdevice->internalSetAlarmEnergy(line.toDouble()/1000000.0);
}
- if (nodename == "charge_full") {
+ if (nodename == "charge_full" || nodename == "energy_full") {
bdevice->internalSetMaximumEnergy(line.toDouble()/1000000.0);
}
- if (nodename == "charge_full_design") {
+ if (nodename == "charge_full_design" || nodename == "energy_full_design") {
bdevice->internalSetMaximumDesignEnergy(line.toDouble()/1000000.0);
}
- if (nodename == "charge_now") {
- bdevice->internalSetEnergy(line.toDouble()/1000000.0);
- }
- if (nodename == "energy_full") {
- bdevice->internalSetMaximumEnergy(line.toDouble()/1000000.0);
- }
- if (nodename == "energy_full_design") {
- bdevice->internalSetMaximumDesignEnergy(line.toDouble()/1000000.0);
- }
- if (nodename == "energy_now") {
+ if (nodename == "charge_now" || nodename == "energy_now") {
bdevice->internalSetEnergy(line.toDouble()/1000000.0);
}
if (nodename == "manufacturer") {
@@ -2753,7 +2744,7 @@ void TDEHardwareDevices::updateExistingDeviceInformation(TDEGenericDevice* exist
if (nodename == "model_name") {
bdevice->internalSetVendorModel(line.stripWhiteSpace());
}
- if (nodename == "power_now") {
+ if (nodename == "power_now" || nodename == "current_now") {
bdevice->internalSetDischargeRate(line.toDouble()/1000000.0);
}
if (nodename == "present") {