From 537f841bf919d3e8c1fa4e01eaab8e6f9897fbca Mon Sep 17 00:00:00 2001 From: Raphael Kubo da Costa Date: Tue, 17 Oct 2023 12:11:18 +0200 Subject: [PATCH] Rewrite Automation section after w3c/sensors#470 The Automation section in the Generic Sensor API specification was rewritten and several terms and concepts have changed. This commit adapts the Gyroscope spec to the changes: * Remove references to "mock sensor type", "mock sensor reading values" and the "MockSensorType" enum. * Define an entry in the per-type virtual sensor metadata map whose key is what used to be the "gyroscope" entry in MockSensorType and an appropriate virtual sensor metadata entry. This is enough to integrate properly with the Generic Sensor spec and allow Gyroscope virtual sensors to be created and used. Fixes #51. --- index.bs | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/index.bs b/index.bs index 5f7b71d..6ceedb4 100644 --- a/index.bs +++ b/index.bs @@ -40,9 +40,6 @@ urlPrefix: https://w3c.github.io/sensors/; spec: GENERIC-SENSOR text: eavesdropping; url: eavesdropping text: generic mitigations; url: mitigation-strategies text: supported sensor options - text: automation - text: mock sensor type - text: mock sensor reading values urlPrefix: https://w3c.github.io/accelerometer/; spec: ACCELEROMETER type: dfn text: device coordinate system @@ -241,23 +238,13 @@ Abstract Operations {#abstract-operations} Automation {#automation} ========== -This section extends the [=automation=] section defined in the Generic Sensor API [[GENERIC-SENSOR]] -to provide mocking information about the rate of rotation around the device's local three primary axes -for the purposes of testing a user agent's implementation of {{Gyroscope}} API. +This section extends [[GENERIC-SENSOR#automation]] by providing [=Gyroscope=]-specific virtual sensor metadata. -

Mock Sensor Type

- -The {{Gyroscope}} class has an associated [=mock sensor type=] which is -"gyroscope", its [=mock sensor reading values=] -dictionary is defined as follows: - -
-  dictionary GyroscopeReadingValues {
-    required double? x;
-    required double? y;
-    required double? z;
-  };
-
+The [=per-type virtual sensor metadata=] [=map=] must have the following [=map/entry=]: +: [=map/key=] +:: "`gyroscope`" +: [=map/value=] +:: A [=virtual sensor metadata=] whose [=virtual sensor metadata/virtual sensor type=] is [=Gyroscope=] and [=reading parsing algorithm=] is [=parse xyz reading=]. Acknowledgements {#acknowledgements} ================