Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Requested sampling frequency' automation concept is confusing #484

Open
rakuco opened this issue Feb 20, 2024 · 0 comments
Open

'Requested sampling frequency' automation concept is confusing #484

rakuco opened this issue Feb 20, 2024 · 0 comments

Comments

@rakuco
Copy link
Member

rakuco commented Feb 20, 2024

As it is currently defined, a virtual sensor's requested sampling frequency is a confusing concept because a virtual sensor acts as a device sensor, whereas in this case we are interested in a platform sensor's sampling frequency.

As the current text says, there is a link between the two concepts, but they are not necessarily the same -- if a platform sensor is polling, its sampling frequency would be non-zero, but the requested sampling frequency could even be zero.

Conceptually, it'd make more sense to have a WebDriver endpoint that retrieves the sampling frequency of the current browsing context's platform sensor that corresponds to a given sensor type, but this wouldn't integrate well with the Device Orientation spec, which has no concept of platform sensors to start with.

An alternative is to have https://w3c.github.io/sensors/#set-sensor-settings and the Model section of the Device Orientation spec explicitly invoke some operation that sets the requested sampling frequency to the platform sensor's sampling frequency or, in the Device Orientation case, some implementation-defined value when they are connected to device sensors. The operation would set the requested sampling frequency to the maximum of the current value and the new value (in case it has more than one user, like when a Sensor-based object is used in a page that also uses the Device Orientation API).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant