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

What's the distance value when the visible surface is beyond the max value? #30

Closed
xiuqijix opened this issue Jan 12, 2018 · 5 comments

Comments

@xiuqijix
Copy link

In previous version, the value is defined between the maximum sensing distance and the minimum sensing distance:

The current device proximity is a value that represents the proximity of the hosting device to a physical >object (i.e., some value between the maximum sensing distance and the minimum sensing distance).

In latest spec, the value isn't limited but there is a sensing range description:

Note: If the implementation is unable to provide the near value, it could infer the near value from the >value of distance. For example, if distance is not equal to max, it could imply there is an object in the >sensing range.

I want to know when there is no object in the sensing range, what's the distance value?

@riju
Copy link
Contributor

riju commented Jan 16, 2018

From the Generic Sensor spec, since

The value of all latest reading entries is initially set to null

I would say, distance value would initially (or when there is no object in sensing range) be null

@anssiko
Copy link
Member

anssiko commented Jan 16, 2018

It'd be logical for the attribute to be null if not within the sensing range.

Proposal: add the following to https://w3c.github.io/proximity/#proximity-sensor-distance:

If the object is outside the sensing distance, it must return null.

Comments?

@xiuqijix
Copy link
Author

I agree, that will be clearer for end user.

@anssiko
Copy link
Member

anssiko commented Jan 17, 2018

I submitted a PR to address this issue (and #29), see: #31

@xiuqijix
Copy link
Author

Thanks @anssiko, the issue had been addressed in #31, close it.

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

3 participants