ISSUE-164: Correct default for charging time if unknown in battery

Correct default for charging time if unknown in battery

State:
CLOSED
Product:
Battery Status API
Raised by:
Frederick Hirsch
Opened on:
2014-06-26
Description:
Issue noted on behalf of Tim Volodine <timvolodine@google.com> :

1. default value for chargingTime:

I think this has been raised in previous comments, but the default value
for chargingTime is still unclear. I think the first paragraph about
default values should look like:

"When the promise is resolved with the battery manager object and the
implementation is unable to provide any battery information the default
values should be as follows (which is equivalent to a fully charged
battery):
charging=true, chargingTime=0, dischargingTime=Inf, level=1."

The "any" clause is important because in the paragraphs below the
chargingTime is said to be +Inf if it cannot be provided by the
implementation, which by the way makes more sense than 0 for platforms
where this attribute cannot be provided (possibly temporarily).

http://lists.w3.org/Archives/Public/public-device-apis/2014Jun/0114.html
Related Actions Items:
No related actions
Related emails:
  1. draft minutes from today's teleconference, 7 Aug 2014 (from w3c@fjhirsch.com on 2014-08-07)
  2. [admin] Agenda - DAP Distributed Meeting 7 August 2014 (from w3c@fjhirsch.com on 2014-08-04)
  3. [battery] Battery Issue summary and status (from w3c@fjhirsch.com on 2014-08-04)
  4. Re: ISSUE-164: Correct default for charging time if unknown in battery (was: [battery] next steps and questions) (from anssi.kostiainen@intel.com on 2014-07-03)
  5. Re: ISSUE-164: Correct default for charging time if unknown in battery (was: [battery] next steps and questions) (from w3c@fjhirsch.com on 2014-07-02)
  6. RE: ISSUE-164: Correct default for charging time if unknown in battery (was: [battery] next steps and questions) (from cathy.chan@nokia.com on 2014-07-02)
  7. Re: ISSUE-164: Correct default for charging time if unknown in battery (was: [battery] next steps and questions) (from anssi.kostiainen@intel.com on 2014-07-02)
  8. RE: ISSUE-164: Correct default for charging time if unknown in battery (was: [battery] next steps and questions) (from cathy.chan@nokia.com on 2014-07-01)
  9. Re: ISSUE-164: Correct default for charging time if unknown in battery (was: [battery] next steps and questions) (from anssi.kostiainen@intel.com on 2014-07-01)
  10. [minutes] Draft minutes 2014-06-26 Teleconference (from w3c@fjhirsch.com on 2014-06-26)
  11. Re: ISSUE-164: Correct default for charging time if unknown in battery (was: [battery] next steps and questions) (from cathy.chan@nokia.com on 2014-06-26)
  12. ISSUE-164: Correct default for charging time if unknown in battery (from sysbot+tracker@w3.org on 2014-06-26)

Related notes:

Updated by Anssi, as per your suggestions with minor edits: https://dvcs.w3.org/hg/dap/rev/b84afc1ef2b0

See email http://lists.w3.org/Archives/Public/public-device-apis/2014Jul/0000.html

Frederick Hirsch, 4 Aug 2014, 19:26:31

http://lists.w3.org/Archives/Public/public-device-apis/2014Jul/0013.html

[[

> I updated the spec as per Tim's and your feedback, which hopefully clarifies
> this.

Yep, that takes care of the inconsistency, which was my major concern.

We still have two paragraphs (above and below the WebIDL) that essentially describe the same thing:
[[
If the implementation is unable to report the battery status information for any of the attributes, the BatteryManager will emulate a fully charged battery by setting all the values to those corresponding values of a fully charged battery. The reason for using full battery defaults for unknown attribute values is that this will not cause applications to degrade performance or functionality by default if information is not available. It also reduces the potential for fingerprinting.
]]
[[
When the promise is resolved with the BatteryManager object and the implementation is unable to provide any battery information, the default values are set as follows (which is equivalent to a fully charged battery): charging MUST be set to true, chargingTime MUST be set to 0, dischargingTime MUST be set to positive Infinity, and level MUST be set to 1.0.
]]
Can we consolidate those into one paragraph, or is there some subtlety that I'm missing? Each time I read through that part of the spec, I found myself trying to figure out what the second paragraph is telling me that the first wasn't.

Also, with this latest edit, I think we can also s/the implementation is unable to report the remaining charging time while the battery is charging but not full/the implementation is unable to report the remaining charging time/ in the description of the chargingTime. That extra phrase ("while the battery is charging but not full") was added to address my previous feedback, but I think we don't need it anymore. Mounir, WDYT?

Regards, Cathy.

]]

Frederick Hirsch, 4 Aug 2014, 19:44:20

http://lists.w3.org/Archives/Public/public-device-apis/2014Jul/0019.html

[[

> Yep, that takes care of the inconsistency, which was my major concern.
>
> Can we consolidate those into one paragraph, or is there some subtlety that I'm missing? Each time I read through that part of the spec, I found myself trying to figure out what the second paragraph is telling me that the first wasn’t.

The text above the IDL reads more like an introduction, while the text below contains the normative assertions.

To clarify this, I moved the introductory-ish text that contains no normative assertions to the Introduction section, and made the other half of the text talking about the defaults a note that I placed below the normative text introducing the concept:

https://dvcs.w3.org/hg/dap/rev/3ab4af97cf9e

Please let us know if this addresses your concern, or whether we should revert back to the previous. To ease the review, here are the updated sections:

https://dvcs.w3.org/hg/dap/raw-file/default/battery/Overview.html#introduction
https://dvcs.w3.org/hg/dap/raw-file/default/battery/Overview.html#the-batterymanager-interface

> Also, with this latest edit, I think we can also s/the implementation is unable to report the remaining charging time while the battery is charging but not full/the implementation is unable to report the remaining charging time/ in the description of the chargingTime. That extra phrase ("while the battery is charging but not full") was added to address my previous feedback, but I think we don't need it anymore. Mounir, WDYT?

Dropped "while the battery is charging but not full”:

https://dvcs.w3.org/hg/dap/rev/eb02dc5983af

Mounir - feel free to revert or make further clarification as needed.
]]

Frederick Hirsch, 4 Aug 2014, 19:49:07

http://lists.w3.org/Archives/Public/public-device-apis/2014Jul/0024.html

[[
> To clarify this, I moved the introductory-ish text that contains no normative
> assertions to the Introduction section,

Personally I think it flows better when that paragraph is in the BatteryManager Interface section.

> and made the other half of the text
> talking about the defaults a note that I placed below the normative text
> introducing the concept:
>

This is perfect! Thanks Anssi!

Regards, Cathy.
]]

Frederick Hirsch, 4 Aug 2014, 19:50:57

http://lists.w3.org/Archives/Public/public-device-apis/2014Jul/0027.html

[[
> Personally I think it flows better when that paragraph is in the BatteryManager Interface section.

I agree

You can have non-normative text in the normative section to make it clear in context.

regards, Frederick
]]

Frederick Hirsch, 4 Aug 2014, 19:52:51

http://lists.w3.org/Archives/Public/public-device-apis/2014Jul/0029.html

[[
I moved the text back to the BatteryManager interface section:

https://dvcs.w3.org/hg/dap/rev/07b650ad4c98

Thanks,

-Anssi
]]

Frederick Hirsch, 4 Aug 2014, 19:53:41

Display change log ATOM feed


Anssi Kostiainen <anssi.kostiainen@intel.com>, Reilly Grant <reillyg@google.com>, Chairs, Fuqiao Xue <xfq@w3.org>, Staff Contact
Tracker: documentation, (configuration for this group), originally developed by Dean Jackson, is developed and maintained by the Systems Team <w3t-sys@w3.org>.
$Id: 164.html,v 1.1 2019/11/08 08:58:20 carcone Exp $