Which FSO interface is best to get battery state
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: r...@om-gta02 ~ $ mdbus -s org.freesmartphone.odeviced /org/freesmartphone/Device/PowerSupply org.freesmartphone.Device.PowerSupply.GetCapacity 31 r...@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 ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Which FSO interface is best to get battery state
Hi Christian, I'm afraid I didn't update the docs after changing the semantics slightly for FSO2. These days, for most applications, I advise to use the aggregated power supply instance, which will provide what you need. The individual supply objects are merely there for monitoring applications. Also, is it certain Freerunner battery is always supply nr. 3? The order of individual power supplies is not guaranteed to be fixed. 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? Or shall I use aggregate one? Yes. :M: ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Which FSO interface is best to get battery state
Hi Mickey, thanks for your fast reply. On Sunday, 24. January 2010 Michael 'Mickey' Lauer wrote: Hi Christian, I'm afraid I didn't update the docs after changing the semantics slightly for FSO2. These days, for most applications, I advise to use the aggregated power supply instance, which will provide what you need. The individual supply objects are merely there for monitoring applications. Thought so about docs ;-). So I need to use both - Get Capacity and GetPowerStatus - to make sure I do not release a resource just because capacity is low as the device might be charging? Cheers, Christian ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Which FSO interface is best to get battery state
Am Sonntag, den 24.01.2010, 23:29 +0100 schrieb Christian Rüb: So I need to use both - Get Capacity and GetPowerStatus - to make sure I do not release a resource just because capacity is low as the device might be charging? Exactly. In your case, GetCapacity should only be evaluated, if PowerStatus is discharging. Cheers, -- :M: ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community