Re: [sensors] Use ''sampling frequency" instead of "polling frequency"

@alexshalamov what you're bringing up here is precisely what I was hinting at in #198.

I 100% agree we need to distinguish between sampling and reporting frequencies.

We have to figure out how they interact, however. Are the two disconnected? That is: do updates to the shared memory trigger ping each sensor which then decide whether they want to emit an event or not, or does each sensor's internal clock poll the shared memory at their own pace? (I would imagine the former is the right strategy.) 

Then we need to figure out quite precisely how the user agent should react to one of these two or both options missing. And also to absurd options like: 

```js
let options = { samplingFrequency: 60, reportingFrequency: 120 }; // INVALID
```

Similarly, can we imagine something like:

```js
let options = { samplingFrequency: 240, syncReportingToAnimationFrame: true }; 
```

I wasn't aware of the low-power / full-mode terminology, but that's the behavior I was hinting at with the periodic reporting mode vs. implementation specific mode. I'm glad we're *finally* getting there.

Would be good to figure out how we want to expose this so as to try to make the default approach the most battery friendly possible.




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

Received on Friday, 26 May 2017 08:18:11 UTC