On 28 December 2010 00:50, Florian Eitel <fei...@indeedgeek.de> wrote: > But something I doesn't understand. I missunderstood my links to kernel > commits. In my opinion current_now is removed completely. But you are > right: power_now replaces current_now only if the value is reported in > uWh. So since 2.6.30 either current_now (reporting uWh) or power_now > (reporting uVh) exists. Both files must be handled and my patch is > incorrect.
Cool. I guess we can drop current_now from upower sometime in 2012. > Sorry, I doesn't tried to understand the whole function so if I'm wrong > please ignore me ;-). As far as I can test it, it works for me. But my > battery uses energy_battery_props. The problem with current_now was that the units were undefined. Depending on whether the battery was reporting in mWh or mAh it could have different units. The second hunk detects if energy_now is zero (i.e. no mWh reporting) and instead uses charge_now and converts it to mWh using the voltage. If we're doing this, we also need to scale the rate to also be in mWh, hence using the voltage. I've pushed my patch to master. Many thanks. Richard. _______________________________________________ devkit-devel mailing list devkit-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/devkit-devel