|
|
|
@ -520,7 +520,7 @@ bool Battery::checkChargeLevelUnit () {
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|