Which FSO interface is best to get battery state
Christian Rüb
christian.rueb at gmx.net
Sun Jan 24 21:08:15 CET 2010
Hi,
after reading docs here [1] I implemented some function in my program to release all resources if battery capacity drops below a user defined value.
The docs say a wall charger reports 100, but looking at dbus it reports the current capacity of the battery while charging, see here:
root at om-gta02 ~ $ mdbus -s org.freesmartphone.odeviced /org/freesmartphone/Device/PowerSupply org.freesmartphone.Device.PowerSupply.GetCapacity
31
root at om-gta02 ~ $ mdbus -s org.freesmartphone.odeviced /org/freesmartphone/Device/PowerSupply/3 org.freesmartphone.Device.PowerSupply.GetCapacity
32
supplies 0-2 always report -1
So which way is best to check my battery is discharging and below requested level? Do I have to always also ask for GetPowerStatus and make sure it is not charging?
Also, is it certain Freerunner battery is always supply nr. 3? Or shall I use aggregate one?
[1] http://git.freesmartphone.org/?p=specs.git;a=blob_plain;f=html/org.freesmartphone.Device.PowerSupply.html;hb=HEAD#GetCapacity
Cheers,
Christian
More information about the community
mailing list