Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef DEVICE_GENERIC_SENSOR_GENERIC_SENSOR_CONSTS_H_ | |
| 6 #define DEVICE_GENERIC_SENSOR_GENERIC_SENSOR_CONSTS_H_ | |
| 7 | |
| 8 namespace device { | |
| 9 | |
| 10 // Required for conversion from G/s^2 to m/s^2 | |
| 11 constexpr double kMeanGravity = 9.80665; | |
| 12 | |
| 13 // Required for conversion from deg/s^2 to rad/s^2 | |
| 14 constexpr double kRadiansInDegreesPerSecond = M_PI / 180.0; | |
|
Reilly Grant (use Gerrit)
2016/11/10 16:53:17
Include the header M_PI is defined in.
maksims (do not use this acc)
2016/11/11 08:52:02
Done.
| |
| 15 | |
| 16 // Required for conversion from Gauss to uT. | |
| 17 constexpr double kMicroteslaInGauss = 100.0; | |
| 18 | |
| 19 // Default rate for returning value of the ambient light sensor. | |
| 20 constexpr int kDefaultAmbientLightFrequencyHz = 5; | |
| 21 | |
| 22 // Default rate for returning value of the accelerometer sensor. | |
| 23 constexpr int kDefaultAccelerometerFrequencyHz = 10; | |
| 24 | |
| 25 // Default rate for returning value of the gyroscope sensor. | |
| 26 constexpr int kDefaultGyroscopeFrequencyHz = 10; | |
| 27 | |
| 28 // Default rate for returning value of the magnetometer sensor. | |
| 29 constexpr int kDefaultMagnetometerFrequencyHz = 10; | |
| 30 | |
| 31 // ChromeOS kernel version, when axes were changed to XYZ. Before 3.18, | |
| 32 // they were YXZ. | |
| 33 const char kChangedAxisKernelVersion[] = "3.18.0"; | |
|
Reilly Grant (use Gerrit)
2016/11/10 16:53:17
Constant string values should be declared in heade
maksims (do not use this acc)
2016/11/11 08:52:02
Oops. I've put this here by accident with other co
| |
| 34 | |
| 35 } // namespace device | |
| 36 | |
| 37 #endif // DEVICE_GENERIC_SENSOR_GENERIC_SENSOR_CONSTS_H_ | |
| OLD | NEW |