From 941d6f3b7217f830e3b18635d1658e210aef11ee Mon Sep 17 00:00:00 2001 From: Raphael Kubo da Costa Date: Wed, 22 Nov 2023 16:57:11 +0100 Subject: [PATCH] Adapt to virtual sensor changes in w3c/sensors#475 The PR above 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. --- index.bs | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/index.bs b/index.bs index 55edd7a..c1192da 100644 --- a/index.bs +++ b/index.bs @@ -189,6 +189,8 @@ The Accelerometer sensor type h :: Invoke the [=generic sensor permission revocation algorithm=] with "accelerometer". : [=Default sensor=] :: The device's main accelerometer sensor. + : [=Virtual sensor type=] + :: "accelerometer" A [=latest reading=] for a {{Sensor}} of Accelerometer sensor type includes three [=map/entries=] whose [=map/keys=] are "x", "y", "z" and whose [=map/values=] contain device's [=acceleration=] @@ -218,6 +220,8 @@ The Linear Acceleration Sensor< :: "[=accelerometer-feature|accelerometer=]" : [=powerful feature/Permission revocation algorithm=] :: Invoke the [=generic sensor permission revocation algorithm=] with "accelerometer". + : [=Virtual sensor type=] + :: "linear-acceleration" A [=latest reading=] for a {{Sensor}} of Linear Acceleration Sensor sensor type includes three [=map/entries=] whose [=map/keys=] are "x", "y", "z" and whose [=map/values=] contain device's [=linear acceleration=] @@ -241,6 +245,8 @@ The Gravity Sensor sensor type :: "[=accelerometer-feature|accelerometer=]" : [=powerful feature/Permission revocation algorithm=] :: Invoke the [=generic sensor permission revocation algorithm=] with "accelerometer". + : [=Virtual sensor type=] + :: "gravity" A [=latest reading=] for a {{Sensor}} of Gravity Sensor sensor type includes three [=map/entries=] whose [=map/keys=] are "x", "y", "z" and whose [=map/values=] contain the acceleration due to [=gravity=] @@ -433,27 +439,27 @@ Accelerometer automation {#accelerometer-automation} The [=per-type virtual sensor metadata=] [=map=] must have the following [=map/entry=]: : [=map/key=] -:: "`accelerometer`" +:: "[=accelerometer virtual sensor type|accelerometer=]" : [=map/value=] -:: A [=virtual sensor metadata=] whose [=virtual sensor metadata/virtual sensor type=] is [=Accelerometer=] and [=reading parsing algorithm=] is [=parse xyz reading=]. +:: A [=virtual sensor metadata=] whose [=virtual sensor metadata/reading parsing algorithm=] is [=parse xyz reading=]. Linear Accelerometer automation {#linear-accelerometer-automation} ----------------------- The [=per-type virtual sensor metadata=] [=map=] must have the following [=map/entry=]: : [=map/key=] -:: "`linear-acceleration`" +:: "[=linear-acceleration virtual sensor type|linear-acceleration=]" : [=map/value=] -:: A [=virtual sensor metadata=] whose [=virtual sensor metadata/virtual sensor type=] is [=Linear Acceleration Sensor=] and [=reading parsing algorithm=] is [=parse xyz reading=]. +:: A [=virtual sensor metadata=] whose [=virtual sensor metadata/reading parsing algorithm=] is [=parse xyz reading=]. Gravity automation {#gravity-automation} ----------------------- The [=per-type virtual sensor metadata=] [=map=] must have the following [=map/entry=]: : [=map/key=] -:: "`gravity`" +:: "[=gravity virtual sensor type|gravity=]" : [=map/value=] -:: A [=virtual sensor metadata=] whose [=virtual sensor metadata/virtual sensor type=] is [=Gravity Sensor=] and [=reading parsing algorithm=] is [=parse xyz reading=]. +:: A [=virtual sensor metadata=] whose [=virtual sensor metadata/reading parsing algorithm=] is [=parse xyz reading=]. Acknowledgements {#acknowledgements} ================