summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/hardware_battery.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/hardware_battery.cpp b/src/hardware_battery.cpp
index 8ae333d..1018254 100644
--- a/src/hardware_battery.cpp
+++ b/src/hardware_battery.cpp
@@ -515,12 +515,12 @@ bool Battery::checkChargeLevelRate () {
*/
bool Battery::checkChargeLevelUnit () {
kdDebugFuncOut(trace);
-
+
// First make sure the battery object is still available
TDEBatteryDevice* bdevice = dynamic_cast<TDEBatteryDevice*>(m_hwdevices->findByUniqueID(udi));
if (!bdevice) {
//grr... no luck
- kdError() << "Battery::checkChargeLevelRate couldn't find battery" << endl;
+ kdError() << "Battery::checkChargeLevelUnit couldn't find battery" << endl;
kdDebugFuncOut(trace);
return false;
}
@@ -531,11 +531,11 @@ bool Battery::checkChargeLevelUnit () {
return false;
}
- // FIXME VERIFY CORRECTNESS
- // what does tdepowersave expect to see in charge_level_unit (battery.charge_level.unit)?
- charge_level_unit = "wH";
- //query was not successfull but this is optional
- kdWarning() << "Couldn't request charge_level.unit for udi: " << udi << endl;
+ // Power supply energy informations in sysfs are always in uWh.
+ // https://www.kernel.org/doc/Documentation/power/power_supply_class.txt
+ // TDE hardware library internally uses Wh.
+ // Since charge level unit are always Wh.
+ charge_level_unit = "Wh";
kdDebugFuncOut(trace);
return false;
}