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

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

From: Tobie Langel via GitHub <sysbot+gh@w3.org>
Date: Fri, 26 May 2017 08:18:04 +0000
To: public-device-apis-log@w3.org
Message-ID: <issue_comment.created-304221680-1495786683-sysbot+gh@w3.org>
@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: 

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

Similarly, can we imagine something like:

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

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