- From: Tobie Langel via GitHub <sysbot+gh@w3.org>
- Date: Thu, 27 Oct 2016 19:14:30 +0000
- To: public-device-apis-log@w3.org
> But from user perspective, in both cases sampling_period (or frequency hint in our case) just indicates how often the sensor reading can be updated. I strongly disagree. In one case (continuous mode), it describes the minimum sampling rate at which the sensor should be polled. In the other, it describes the maximum frequency at which the API consumer should be updated. The developer intent behind these two cases is very different, and so is how this value is handled by the underlying layer. For a given frequency `|f|` the frequency range the developer expects is `[|f|, MAX_POLLING_FREQUENCY]` in the first case and `[0, |f|]`. That Android decided to conflate these two different concepts behind the same parameter is an API design mistake we shouldn't replicate. I'm more than open to add a dedicated option to allow developers to limit the interval at which non-periodic sensors update them if there's a use case for it. That'd be a level 2 feature, though. -- GitHub Notification of comment by tobie Please view or discuss this issue at https://github.com/w3c/sensors/issues/126#issuecomment-256741273 using your GitHub account
Received on Thursday, 27 October 2016 19:14:36 UTC