Re: Last Call spec has charging as true when discharging

Of note, this thread is bouncing between two lists, that's really bad. I believe Device-Status is the correct list (I'm sorry for not enforcing it and hope I'm subscribed to both) - sadly my mailer is being annoying.

Sending a signal when the system is at 100% and the user disconnects the power cable is just a waste.

Letting ua's wait until the battery hits 99% and then sending out the signal is better. It also let's desktops fit in better with portables.

From: Carr, Wayne [mailto:wayne.carr@intel.com]
Sent: Friday, December 02, 2011 04:19 PM
To: public-device-apis@w3.org <public-device-apis@w3.org>
Subject: Last Call spec has charging as true when discharging

Separating this from detecting battery presence thread and restating the problem.

Problem with draft: Suppose the battery is full and the user disconnects the power.  The battery is now in use and is discharging.  The Battery API Last Call draft [1] requires the charging attribute to be set to true, even though the battery is actually discharging.  That is an error in the spec.


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.  If the implementation is unable to determine the state or there is no battery attached to the system or for any other state not explicitly defined, the attribute must be set to true. No exceptions."

A Boolean probably isn’t the best thing here.   Enumeration of {charging, discharging, unknown} is an alternate fix.

[1] http://www.w3.org/TR/battery-status/



---------------------------------------------------------------------
This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.

Received on Friday, 2 December 2011 21:37:46 UTC