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

Re: [sensors] Call 'onchange' on a Senor instance considering its own frequency hint

From: Tobie Langel via GitHub <sysbot+gh@w3.org>
Date: Fri, 26 May 2017 12:39:08 +0000
To: public-device-apis-log@w3.org
Message-ID: <issue_comment.created-304272606-1495802346-sysbot+gh@w3.org>
> Not really, the point is that Sensor A is decoupled from Sensor B.
For example if you start a slow sensor { frequency : 1 } and listen to onchange from it you anticipate this onchange to be called once per second, later you start a fast sensor {frequency : 40 } but you still expect to receive notification from the slow sensor once per second. However, with the current ED you will suddenly get it 40 times per second, and then when fast sensor stops, you'll get it again once per second :)

Right, but that's completely orthogonal to the existence of a per instance cache of the sensor reading. See, this is precisely why I don't like merging huge diffs in. ;)

I'm not saying the per instance cache might not be a desirable feature, but it's unrelated to what you describe above, which is just eventing mechanics.

GitHub Notification of comment by tobie
Please view or discuss this issue at https://github.com/w3c/sensors/issues/152#issuecomment-304272606 using your GitHub account
Received on Friday, 26 May 2017 12:39:14 UTC

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