W3C home > Mailing lists > Public > public-device-apis-log@w3.org > October 2016

Re: [ambient-light] What illuminance value should be reported for stopped sensor?

From: Rick Waldron via GitHub <sysbot+gh@w3.org>
Date: Mon, 31 Oct 2016 21:40:24 +0000
To: public-device-apis-log@w3.org
Message-ID: <issue_comment.created-257428657-1477950022-sysbot+gh@w3.org>
> > Spec says that Sensor.reading points to current reading. Reading 
is an object, therefore if I write let cached = Sensor.reading; by 
default JS engines will make reference, as a web developer I might 
think that cached is pointing to current reading.
>
> That's a good point in terms of meeting developer expectations. 
@rwaldron, WDYT?

I think the language shouldn't use the word "current", for two 
reasons: 

1. Since we're in the realm of discussing electrical things, the word 
"current" is already reserved for the thing measured in terms of amps.
 Is "current reading" a measurement of a sensor's current consumption,
 or the most recent measurement of some readable thing?
2. As @alexshalamov has identified, "current reading" doesn't make 
sense if the sensor is presently stopped; "last reading", "latest 
reading", "most recent reading"... these might be better for spec 
language.

W/r to `sensor.read/start()`: `sensor.read()` would have its own 
baggage, specifically that devs might expect it to return a value, 
which it wouldn't (and definitely shouldn't). 





-- 
GitHub Notification of comment by rwaldron
Please view or discuss this issue at 
https://github.com/w3c/ambient-light/issues/15#issuecomment-257428657 
using your GitHub account
Received on Monday, 31 October 2016 21:40:30 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 12:18:52 UTC