Skip to content

Commit

Permalink
Adapt to virtual sensor changes in w3c/sensors#475
Browse files Browse the repository at this point in the history
w3c/sensors#475 removed the "virtual sensor type" item from the "virtual
sensor metadata" struct and turned it into a string that is referenced from
the automation bits as well as (optionally) defined by a sensor type.

Adapt to it here by removing mentions of `[=virtual sensor metadata/virtual
sensor type=]` from the spec and adding virtual sensor types to each sensor
type defined here.
  • Loading branch information
rakuco committed Nov 22, 2023
1 parent 576057f commit 147f420
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ The <dfn id="proximity-sensor-sensor-type">Proximity Sensor</dfn> <a>sensor type
:: Invoke the [=generic sensor permission revocation algorithm=] with "<code><a permission>proximity</a></code>".
: [=Default sensor=]
:: The device's main proximity detector.
: [=Virtual sensor type=]
:: "<code><dfn data-lt="proximity virtual sensor type">proximity</dfn></code>"

A [=latest reading=] for a {{Sensor}} of <a>Proximity Sensor</a> <a>sensor type</a> includes three [=map/entries=]
whose [=map/keys=] are "distance", "max", "near" and whose [=map/values=] contain [=distance=],
Expand Down Expand Up @@ -212,9 +214,9 @@ This section extends [[GENERIC-SENSOR#automation]] by providing [=Proximity Sens

The [=per-type virtual sensor metadata=] [=map=] must have the following [=map/entry=]:
: [=map/key=]
:: "`proximity`"
:: "<code>[=proximity virtual sensor type|proximity=]</code>"
: [=map/value=]
:: A [=virtual sensor metadata=] whose [=virtual sensor metadata/virtual sensor type=] is [=Proximity Sensor=] and [=reading parsing algorithm=] is the [=proximity reading parsing algorithm=].
:: A [=virtual sensor metadata=] whose [=virtual sensor metadata/reading parsing algorithm=] is the [=proximity reading parsing algorithm=].

<h3 dfn>Proximity reading parsing algorithm</h3>
<div algorithm="proximity reading parsing algorithm">
Expand Down

0 comments on commit 147f420

Please sign in to comment.