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

Unified Diff: device/generic_sensor/platform_sensor_reader_win.cc

Issue 2648423005: [sensors][win] Use angular velocity values for gyroscope sensor (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « device/generic_sensor/platform_sensor_and_provider_unittest_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/generic_sensor/platform_sensor_reader_win.cc
diff --git a/device/generic_sensor/platform_sensor_reader_win.cc b/device/generic_sensor/platform_sensor_reader_win.cc
index d19b61fd6df8765e5a2fcf9c65d204def9e0bd95..d577179212b204c040bd94353e202764de81fcff 100644
--- a/device/generic_sensor/platform_sensor_reader_win.cc
+++ b/device/generic_sensor/platform_sensor_reader_win.cc
@@ -109,20 +109,20 @@ std::unique_ptr<ReaderInitParams> CreateGyroscopeReaderInitParams() {
double y = 0.0;
double z = 0.0;
if (!GetReadingValueForProperty(
- SENSOR_DATA_TYPE_ANGULAR_ACCELERATION_X_DEGREES_PER_SECOND_SQUARED,
- report, &x) ||
+ SENSOR_DATA_TYPE_ANGULAR_VELOCITY_X_DEGREES_PER_SECOND, report,
+ &x) ||
!GetReadingValueForProperty(
- SENSOR_DATA_TYPE_ANGULAR_ACCELERATION_Y_DEGREES_PER_SECOND_SQUARED,
- report, &y) ||
+ SENSOR_DATA_TYPE_ANGULAR_VELOCITY_Y_DEGREES_PER_SECOND, report,
+ &y) ||
!GetReadingValueForProperty(
- SENSOR_DATA_TYPE_ANGULAR_ACCELERATION_Z_DEGREES_PER_SECOND_SQUARED,
- report, &z)) {
+ SENSOR_DATA_TYPE_ANGULAR_VELOCITY_Z_DEGREES_PER_SECOND, report,
+ &z)) {
return E_FAIL;
}
// Windows uses coordinate system where Z axis points down from device
// screen, therefore, using right hand notation, we have to reverse
- // sign for each axis. Values are converted from deg/s^2 to rad/s^2.
+ // sign for each axis. Values are converted from deg/s to rad/s.
reading.values[0] = -x * kRadiansInDegreesPerSecond;
Mikhail 2017/01/24 14:24:48 s/kRadiansInDegreesPerSecond/kRadiansInDegrees
reading.values[1] = -y * kRadiansInDegreesPerSecond;
reading.values[2] = -z * kRadiansInDegreesPerSecond;
« no previous file with comments | « device/generic_sensor/platform_sensor_and_provider_unittest_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698