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

Unified Diff: device/generic_sensor/platform_sensor_reader_win.cc

Issue 2648423005: [sensors][win] Use angular velocity values for gyroscope sensor (Closed)
Patch Set: Rename constant 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..5b77b6c86336736ee4bbed9a0ea2408772dbfdf2 100644
--- a/device/generic_sensor/platform_sensor_reader_win.cc
+++ b/device/generic_sensor/platform_sensor_reader_win.cc
@@ -109,23 +109,23 @@ 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.
- reading.values[0] = -x * kRadiansInDegreesPerSecond;
- reading.values[1] = -y * kRadiansInDegreesPerSecond;
- reading.values[2] = -z * kRadiansInDegreesPerSecond;
+ // sign for each axis. Values are converted from deg to rad.
+ reading.values[0] = -x * kRadiansInDegrees;
+ reading.values[1] = -y * kRadiansInDegrees;
+ reading.values[2] = -z * kRadiansInDegrees;
return S_OK;
});
return params;
« 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