Re: [sensors] Call 'onchange' only when data changes and considering frequency hint

@tobie I think we're in agreement that change of timestamp does mean that the reading is different and `onchange` should be called for it, therefore I'm modifying the issue title.

The problem with the notification frequency (https://github.com/w3c/sensors/issues/152#issuecomment-259947092) however remains. In order to solve it, could we embark on the cached reading per Sensor instance (instead of shared reading)? What I mean is:

1) a sensor (as a concept) still has shared _sensor readings_
2) each Sensor instance reads the _sensor readings_ considering its individual frequency hint, sends `onchange` and caches the obtained reading.

Thus we sync the Sensor instance's data (returned from getters) with its notifications; also we obviate side effects when other Sensor instances of the same type and with different frequencies appear.

-- 
GitHub Notification of comment by pozdnyakov
Please view or discuss this issue at https://github.com/w3c/sensors/issues/152#issuecomment-288983066 using your GitHub account

Received on Friday, 24 March 2017 10:12:32 UTC