[Kde-hardware-devel] Review Request 117339: Add timeToFull/timeToEmpty, recall notice and FullyCharged to Solid::Battery
Lukáš Tinkl
lukas at kde.org
Thu Apr 3 12:21:07 UTC 2014
> On April 3, 2014, 1:23 p.m., Lukáš Tinkl wrote:
> > While you're at it, do you think it would be worthwhile to also add the other (new) properties, like temperature?
>
> Kai Uwe Broulik wrote:
> Sure, saw them in dbusviewer but I didn't find them in the specs [1]. Do you know where I can find more recent docs, also about properties like "Luminosity"?
>
> [1] http://upower.freedesktop.org/docs/Device.html
>
> Lukáš Tinkl wrote:
> Use the source Luke ;)
>
> Here: http://cgit.freedesktop.org/upower/tree/src/org.freedesktop.UPower.Device.xml
>
> Kai Uwe Broulik wrote:
> Thx :)
> Do we also want all the EnergyEmpty/EnergyFullDesign/EnergyFullDesign stuff or is capacity which we currently have sufficient?
Capacity is imho enough
- Lukáš
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/117339/#review54922
-----------------------------------------------------------
On April 2, 2014, 9:33 p.m., Kai Uwe Broulik wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/117339/
> -----------------------------------------------------------
>
> (Updated April 2, 2014, 9:33 p.m.)
>
>
> Review request for Solid and Àlex Fiestas.
>
>
> Repository: solid
>
>
> Description
> -------
>
> This adds the following functionality to Solid::Battery:
>
> - timeToFull and timeToEmpty (at the moment provided by PowerDevil but for all batteries combined, this patch does it individually for each)
> - rename isPlugged to isPresent (as plugged always confused me - it has nothing to do with whether AC is plugged in but if the battery is "present in its bay", it's also the name of the UPower iface)
> - FullyCharged battery state, we cannot rely on the battery being 100%, and since the info is provided by UPower (not on HAL), why not use it
> - RecallVendor/RecallUrl when a battery has been recalled by the vendor, currently provided/handled by PowerDevil
> - Serial number of the battery
>
> Sorry for the hard to read patch but I also re-ordered some methods to have the order in all implementations and headers the same.
>
>
> Diffs
> -----
>
> src/solid/backends/upower/upowerbattery.h f0f41b5
> src/solid/backends/upower/upowerbattery.cpp c771f68
> src/solid/battery.h bbf2201
> src/solid/battery.cpp 3cc376f
> src/solid/ifaces/battery.h 864f93d
> src/solid/backends/fakehw/fakebattery.h f544613
> src/solid/backends/fakehw/fakebattery.cpp 9af4c6c
> src/solid/backends/hal/halbattery.h 71d654d
> src/solid/backends/hal/halbattery.cpp a2ac83d
>
> Diff: https://git.reviewboard.kde.org/r/117339/diff/
>
>
> Testing
> -------
>
> Compiles, solid-hardware5 details /org/freedesktop/UPower/devices/battery_BAT0 reports:
>
> udi = '/org/freedesktop/UPower/devices/battery_BAT0'
> parent = '/org/freedesktop/UPower' (string)
> vendor = 'ASUSTeK' (string)
> product = 'UX31-35' (string)
> description = 'Lithium Ion Battery' (string)
> Battery.present = true (bool)
> Battery.type = 'PrimaryBattery' (0x3) (enum)
> Battery.chargePercent = 31 (0x1f) (int)
> Battery.capacity = 83 (0x53) (int)
> Battery.rechargeable = true (bool)
> Battery.powerSupply = true (bool)
> Battery.chargeState = 'Discharging' (0x2) (enum)
> Battery.timeToEmpty = 5105 (0x13f1) (qlonglong)
> Battery.timeToFull = 0 (0x0) (qlonglong)
> Battery.energy = '13.223' (string) ? dunno why it says string, it's double everywhere
> Battery.energyRate = '9.324' (string) ? same
> Battery.voltage = '7.4' (string) ? same
> Battery.recalled = false (bool)
> Battery.recallVendor = '' (string)
> Battery.recallUrl = '' (string)
> Battery.serial = '' (string)
>
>
> Thanks,
>
> Kai Uwe Broulik
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-hardware-devel/attachments/20140403/28659d01/attachment.html>
More information about the Kde-hardware-devel
mailing list