W3C home > Mailing lists > Public > public-device-apis@w3.org > December 2011

Re: no longer possible to detect battery presence? RE: Battery API in Last Call

From: Mounir Lamouri <mounir@lamouri.fr>
Date: Sat, 03 Dec 2011 00:02:42 +0100
Message-ID: <4ED95912.30505@lamouri.fr>
To: public-device-apis@w3.org
On 12/02/2011 07:15 PM, Carr, Wayne wrote:
>>> If you have a full battery and disconnect your power source,  the spec says to
>> report that the battery is charging --  even though it really is discharging.
>>
>> That is a bug in the specs and should be raised separately.
>
> The bug in the spec that makes it so it says charging when it is actually discharging, also seems to makes it so you can also always determine when a battery is in use. (either charging or discharging.
>
> Current text for charging attribute: "The attribute must be set to false if the battery is discharging, and set to true, if the battery is charging, full, the implementation is unable to report the state, or there is no battery attached to the system, or otherwise.
> No exceptions."
>
> Suggested text for charging attribute: "The attribute must be set to false if the battery is discharging, and set to true if the battery is charging.  Otherwise, the attribute is set to true if the battery is neither charging nor discharging or If the implementation is unable to report the state or there is no battery attached to the system. No exceptions."

Seems reasonable to me. I guess theoretically a discharging battery 
can't be full but in practice, depending on the battery level precision, 
that could happen.

--
Mounir
Received on Friday, 2 December 2011 23:03:10 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:14:26 GMT