diff options
author | Mark Salyzyn <salyzyn@google.com> | 2014-09-10 15:38:35 -0700 |
---|---|---|
committer | Mark Salyzyn <salyzyn@google.com> | 2014-09-14 09:54:01 -0700 |
commit | b4065fdea50997dc485ab9a4b16266650c156b36 (patch) | |
tree | 290238fa58d2707f6a15bce98d2ce4bcbd5ce1a8 /60xx | |
parent | 6a9192470eceac080b9d84081dac0c98e2362fe9 (diff) | |
download | android_hardware_invensense-b4065fdea50997dc485ab9a4b16266650c156b36.tar.gz android_hardware_invensense-b4065fdea50997dc485ab9a4b16266650c156b36.tar.bz2 android_hardware_invensense-b4065fdea50997dc485ab9a4b16266650c156b36.zip |
Manta: libsensors_iio: limit 200Hz sampling rate
Bug: 14121320
Change-Id: I8b7e036cd2dc4ea01c245ba6051a90f9a5530702
Diffstat (limited to '60xx')
-rw-r--r-- | 60xx/libsensors_iio/MPLSensor.cpp | 9 | ||||
-rw-r--r-- | 60xx/libsensors_iio/sensor_params.h | 4 |
2 files changed, 4 insertions, 9 deletions
diff --git a/60xx/libsensors_iio/MPLSensor.cpp b/60xx/libsensors_iio/MPLSensor.cpp index b5b9e47..f1ec9ea 100644 --- a/60xx/libsensors_iio/MPLSensor.cpp +++ b/60xx/libsensors_iio/MPLSensor.cpp @@ -1500,16 +1500,11 @@ int MPLSensor::setDelay(int32_t handle, int64_t ns) LOGV_IF(PROCESS_VERBOSE, "setDelay : %llu ns, (%.2f Hz)", ns, 1000000000.f / ns); // limit all rates to reasonable ones */ -/* - if (ns < 10000000LL) { - ns = 10000000LL; - } -*/ if (ns < 5000000LL) { ns = 5000000LL; } - /* store request rate to mDelays arrary for each sensor */ + /* store request rate to mDelays array for each sensor */ mDelays[what] = ns; switch (what) { @@ -2152,7 +2147,7 @@ int MPLSensor::enableDmpOrientation(int en) //Enable DMP orientation if (write_sysfs_int(mpu.display_orientation_on, en) < 0) { LOGE("HAL:ERR can't enable Android orientation"); - res = -1; // indicate an err + res = -1; // indicate an err } // open DMP Orient Fd diff --git a/60xx/libsensors_iio/sensor_params.h b/60xx/libsensors_iio/sensor_params.h index 39e3e5c..eef0b3b 100644 --- a/60xx/libsensors_iio/sensor_params.h +++ b/60xx/libsensors_iio/sensor_params.h @@ -156,7 +156,7 @@ #define ACCEL_MPU6050_RANGE (2.f * GRAVITY_EARTH)
#define ACCEL_MPU6050_RESOLUTION (0.004f * GRAVITY_EARTH)
#define ACCEL_MPU6050_POWER (0.f)
-#define ACCEL_MPU6050_MINDELAY (1000)
+#define ACCEL_MPU6050_MINDELAY (5000)
/******************************************/
//GYRO MPU3050
#define RAD_P_DEG (3.14159f / 180.f)
@@ -168,7 +168,7 @@ #define GYRO_MPU6050_RANGE (2000.f * RAD_P_DEG)
#define GYRO_MPU6050_RESOLUTION (2000.f / 32768.f * RAD_P_DEG)
#define GYRO_MPU6050_POWER (5.5f)
-#define GYRO_MPU6050_MINDELAY (1000)
+#define GYRO_MPU6050_MINDELAY (5000)
//GYRO MPU9150
#define GYRO_MPU9150_RANGE (2000.f * RAD_P_DEG)
#define GYRO_MPU9150_RESOLUTION (2000.f / 32768.f * RAD_P_DEG)
|