Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6021)

Unified Diff: device/generic_sensor/public/cpp/sensor_reading.h

Issue 2847253002: [Device Service] Add RELATIVE_ORIENTATION sensor type to //device/generic_sensor (Closed)
Patch Set: address nits Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: device/generic_sensor/public/cpp/sensor_reading.h
diff --git a/device/generic_sensor/public/cpp/sensor_reading.h b/device/generic_sensor/public/cpp/sensor_reading.h
index 81e2f76822c58886b72e409563e94086bd74f252..a7048f7a9a348a8b59e7f901d90ee2b0c8db7cbf 100644
--- a/device/generic_sensor/public/cpp/sensor_reading.h
+++ b/device/generic_sensor/public/cpp/sensor_reading.h
@@ -46,6 +46,56 @@ struct DEVICE_GENERIC_SENSOR_PUBLIC_EXPORT SensorReading {
SensorReading(const SensorReading& other);
SensorReadingField<double> timestamp;
constexpr static int kValuesCount = 4;
+ // AMBIENT_LIGHT:
+ // values[0]: ambient light level in SI lux units.
+ //
+ // PROXIMITY:
+ // values[0]: proximity sensor distance measured in centimeters.
+ //
+ // ACCELEROMETER:
+ // values[0]: acceleration minus Gx on the x-axis.
+ // values[1]: acceleration minus Gy on the y-axis.
+ // values[2]: acceleration minus Gz on the z-axis.
+ //
+ // LINEAR_ACCELERATION:
+ // values[0]: acceleration on the x-axis.
+ // values[1]: acceleration on the y-axis.
+ // values[2]: acceleration on the z-axis.
+ //
+ // GYROSCOPE:
+ // values[0]: angular speed around the x-axis.
+ // values[1]: angular speed around the y-axis.
+ // values[2]: angular speed around the z-axis.
+ //
+ // MAGNETOMETER:
+ // values[0]: ambient magnetic field in the x-axis in micro-Tesla (uT).
+ // values[1]: ambient magnetic field in the y-axis in micro-Tesla (uT).
+ // values[2]: ambient magnetic field in the z-axis in micro-Tesla (uT).
+ //
+ // PRESSURE:
+ // values[0]: atmospheric pressure in hPa (millibar).
+ //
+ // ABSOLUTE_ORIENTATION:
+ // values[0]: x value of a quaternion representing the orientation of the
+ // device in 3D space.
+ // values[1]: y value of a quaternion representing the orientation of the
+ // device in 3D space.
+ // values[2]: z value of a quaternion representing the orientation of the
+ // device in 3D space.
+ // values[3]: w value of a quaternion representing the orientation of the
+ // device in 3D space.
+ //
+ // RELATIVE_ORIENTATION:
+ // (Identical to ABSOLUTE_ORIENTATION except that it doesn't use the
+ // geomagnetic field.)
+ // values[0]: x value of a quaternion representing the orientation of the
+ // device in 3D space.
+ // values[1]: y value of a quaternion representing the orientation of the
+ // device in 3D space.
+ // values[2]: z value of a quaternion representing the orientation of the
+ // device in 3D space.
+ // values[3]: w value of a quaternion representing the orientation of the
+ // device in 3D space.
dcheng 2017/05/03 20:58:53 Maybe we should be using a union? That seems like
juncai 2017/05/04 17:51:09 Filed bug: https://bugs.chromium.org/p/chromium/is
SensorReadingField<double> values[kValuesCount];
};

Powered by Google App Engine
This is Rietveld 408576698