|
|
@ -520,7 +520,7 @@ bool Battery::checkChargeLevelUnit () {
|
|
|
|
TDEBatteryDevice* bdevice = dynamic_cast<TDEBatteryDevice*>(m_hwdevices->findByUniqueID(udi));
|
|
|
|
TDEBatteryDevice* bdevice = dynamic_cast<TDEBatteryDevice*>(m_hwdevices->findByUniqueID(udi));
|
|
|
|
if (!bdevice) {
|
|
|
|
if (!bdevice) {
|
|
|
|
//grr... no luck
|
|
|
|
//grr... no luck
|
|
|
|
kdError() << "Battery::checkChargeLevelRate couldn't find battery" << endl;
|
|
|
|
kdError() << "Battery::checkChargeLevelUnit couldn't find battery" << endl;
|
|
|
|
kdDebugFuncOut(trace);
|
|
|
|
kdDebugFuncOut(trace);
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -531,11 +531,11 @@ bool Battery::checkChargeLevelUnit () {
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// FIXME VERIFY CORRECTNESS
|
|
|
|
// Power supply energy informations in sysfs are always in uWh.
|
|
|
|
// what does tdepowersave expect to see in charge_level_unit (battery.charge_level.unit)?
|
|
|
|
// https://www.kernel.org/doc/Documentation/power/power_supply_class.txt
|
|
|
|
charge_level_unit = "wH";
|
|
|
|
// TDE hardware library internally uses Wh.
|
|
|
|
//query was not successfull but this is optional
|
|
|
|
// Since charge level unit are always Wh.
|
|
|
|
kdWarning() << "Couldn't request charge_level.unit for udi: " << udi << endl;
|
|
|
|
charge_level_unit = "Wh";
|
|
|
|
kdDebugFuncOut(trace);
|
|
|
|
kdDebugFuncOut(trace);
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|