Commit f5373ddf authored by Wenjie Shi's avatar Wenjie Shi Committed by Commit Bot

Add README for Chromium sensor backend modernization on Windows.

This document introduces the proposed design changes for modernizing
the Chromium sensor backend on Windows allowing it to use the new
Windows.Devices.Sensor WinRT APIs instead of the deprecated ISensor Win32 API.

This README will not cover the context or justification for the
modernization work as it is already captured by this document:
https://docs.google.com/document/d/1Vr5xXOu4v-H6ydeCJed1bU_WR9kBYm3ANV-GB-JPZuw/edit?usp=sharing

The new README file also reads more like a future looking document
(contains "will do this..." and "proposed") since it not implemented yet.

Change-Id: Ibcfeb9020bd930d50ab9898ce0ee145c9e645e1c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1664111
Commit-Queue: Wenjie Shi <wensh@microsoft.com>
Reviewed-by: default avatarReilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#672220}
parent 0cc2b315
......@@ -64,15 +64,15 @@ platform.
| SensorType | Android | Linux | macOS | Windows |
| --------------------------------- | ------------------------- | ------------------------------------- | ------------------------------------- | ----------------------------------------- |
| AMBIENT_LIGHT | TYPE_LIGHT | in_illuminance | AppleLMUController | SENSOR_TYPE_AMBIENT_LIGHT |
| AMBIENT_LIGHT | TYPE_LIGHT | in_illuminance | AppleLMUController | Yes |
| PROXIMITY | | | | |
| ACCELEROMETER | TYPE_ACCELEROMETER | in_accel | SMCMotionSensor | SENSOR_TYPE_ACCELEROMETER_3D |
| ACCELEROMETER | TYPE_ACCELEROMETER | in_accel | SMCMotionSensor | Yes |
| LINEAR_ACCELEROMETER | See below | ACCELEROMETER (*) | | ACCELEROMETER (*) |
| GYROSCOPE | TYPE_GYROSCOPE | in_anglvel | | SENSOR_TYPE_GYROMETER_3D |
| MAGNETOMETER | TYPE_MAGNETIC_FIELD | in_magn | | SENSOR_TYPE_COMPASS_3D |
| GYROSCOPE | TYPE_GYROSCOPE | in_anglvel | | Yes |
| MAGNETOMETER | TYPE_MAGNETIC_FIELD | in_magn | | Yes |
| PRESSURE | | | | |
| ABSOLUTE_ORIENTATION_EULER_ANGLES | See below | ACCELEROMETER and MAGNETOMETER (*) | | SENSOR_TYPE_INCLINOMETER_3D |
| ABSOLUTE_ORIENTATION_QUATERNION | See below | ABSOLUTE_ORIENTATION_EULER_ANGLES (*) | | SENSOR_TYPE_AGGREGATED_DEVICE_ORIENTATION |
| ABSOLUTE_ORIENTATION_EULER_ANGLES | See below | ACCELEROMETER and MAGNETOMETER (*) | | Yes |
| ABSOLUTE_ORIENTATION_QUATERNION | See below | ABSOLUTE_ORIENTATION_EULER_ANGLES (*) | | Yes |
| RELATIVE_ORIENTATION_EULER_ANGLES | See below | ACCELEROMETER and GYROSCOPE (*) | ACCELEROMETER (*) | |
| | | or ACCELEROMETER (*) | | |
| RELATIVE_ORIENTATION_QUATERNION | TYPE_GAME_ROTATION_VECTOR | RELATIVE_ORIENTATION_EULER_ANGLES (*) | RELATIVE_ORIENTATION_EULER_ANGLES (*) | |
......@@ -132,13 +132,7 @@ value that can be read from the RELATIVE_ORIENTATION_EULER_ANGLES.
### Windows
Sensors are implemented by passing through values provided by the
[Sensor API](https://msdn.microsoft.com/en-us/library/windows/desktop/dd318953(v=vs.85).aspx).
The values in the "Windows" column of the table above correspond to the names of
the sensor type GUIDs used to provide data for a SensorType. The
LINEAR_ACCELEROMETER sensor type is provided by implementing a low-pass-filter
over the values returned by the ACCELEROMETER in order to remove the
contribution of the gravitational force.
Please refer to this [document](windows/README.md).
## Testing
......@@ -150,7 +144,6 @@ The sensors unit tests file for Android is
Sensors browser tests are located in `content/test/data/generic_sensor`.
## Design Documents
Please refer to the [design documentation](https://docs.google.com/document/d/1Ml65ZdW5AgIsZTszk4mD_ohr40pcrdVFOIf0ZtWxDv0)
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment