W3C home > Mailing lists > Public > public-device-apis-log@w3.org > January 2017

Re: [sensors] Reading attributes at different sensor states

From: Tobie Langel via GitHub <sysbot+gh@w3.org>
Date: Tue, 31 Jan 2017 14:59:50 +0000
To: public-device-apis-log@w3.org
Message-ID: <issue_comment.created-276386209-1485874789-sysbot+gh@w3.org>
> my proposal would be to return reading values only in "activated" 
state and return null otherwise

That's probably the most sensible thing to do.

I think the easiest solution is for me to add an abstract operation to
 get a value from the latest reading which takes _sensor_ and _name_ 
as argument and returns value or `null`.

Then you can just define your attribute getters roughly as:

Return [=get value from latest reading=] with |this| as 
|sensor_instance| and |attribute_name| as |key|.

GitHub Notification of comment by tobie
Please view or discuss this issue at 
https://github.com/w3c/sensors/issues/168#issuecomment-276386209 using
 your GitHub account
Received on Tuesday, 31 January 2017 14:59:56 UTC

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