From 9a84f8592c6451cc51d5e61519169283926e5b3b Mon Sep 17 00:00:00 2001 From: Archana Patni Date: Thu, 20 Feb 2014 12:05:57 +0530 Subject: [PATCH] libsensors: Fix accel and gyro min delay An earlier commit "https://aia-review.intel.com/#/c/4829/" set the min delay to 100000 which limited the polling frequency for gyro and accel (from 100+Hz to ~10Hz). Setting it to 10000 fixes the issues and handles the original problem as well (too many events). Issue: APDEV-1510 Issue: APDEV-1513 Change-Id: I66bb2749cec368bdd203dd92e0760ed6fce2dbc5 Signed-off-by: Archana Patni Reviewed-on: https://android.intel.com/165258 Reviewed-by: Sesha, Subramony Reviewed-by: Lilja, Ola --- HidSensor_Accel3D.cpp | 2 +- HidSensor_Gyro3D.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/HidSensor_Accel3D.cpp b/HidSensor_Accel3D.cpp index 01fda5f..fae0b57 100644 --- a/HidSensor_Accel3D.cpp +++ b/HidSensor_Accel3D.cpp @@ -38,7 +38,7 @@ struct accel_3d_sample{ const struct sensor_t AccelSensor::sSensorInfo_accel3D = { "HID_SENSOR Accelerometer 3D", "Intel", 1, SENSORS_ACCELERATION_HANDLE, - SENSOR_TYPE_ACCELEROMETER, RANGE_A, RESOLUTION_A, 0.23f, 100000, 0, 0, {} + SENSOR_TYPE_ACCELEROMETER, RANGE_A, RESOLUTION_A, 0.23f, 10000, 0, 0, {} }; const long HID_USAGE_SENSOR_UNITS_G = 0x1A; diff --git a/HidSensor_Gyro3D.cpp b/HidSensor_Gyro3D.cpp index 4222078..979b27d 100644 --- a/HidSensor_Gyro3D.cpp +++ b/HidSensor_Gyro3D.cpp @@ -38,7 +38,7 @@ struct gyro_3d_sample{ const struct sensor_t GyroSensor::sSensorInfo_gyro3D = { "HID_SENSOR Gyro 3D", "Intel", 1, SENSORS_GYROSCOPE_HANDLE, - SENSOR_TYPE_GYROSCOPE, RANGE_GYRO, RESOLUTION_GYRO, 6.10f, 100000, 0, 0, {} + SENSOR_TYPE_GYROSCOPE, RANGE_GYRO, RESOLUTION_GYRO, 6.10f, 10000, 0, 0, {} }; const int HID_USAGE_SENSOR_UNITS_NOT_SPECIFIED = 0x00; const int HID_USAGE_SENSOR_UNITS_DEGREES_PER_SECOND = 0x15; -- 2.11.0