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 

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 

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 
using your GitHub account
Received on Monday, 31 October 2016 21:40:30 UTC

This archive was generated by hypermail 2.4.0 : Monday, 4 July 2022 12:47:52 UTC