From becd9eafd431693dd18175207a4ea8b2584efd5e Mon Sep 17 00:00:00 2001 From: Ricardo Cerqueira Date: Sat, 13 Feb 2016 01:27:20 +0000 Subject: [PATCH] sensors: Raise the max limit on the magnetometer rate Although the mag modules in the daemon were limited to 20hz, the HAL was announcing 50hz. Fix the HAL value so that it matches the daemon implementation android.hardware.cts.SingleSensorTests#testMagneticFieldUncalibrated_100hz, testMagneticFieldUncalibrated_100hz, testMagneticFieldUncalibrated_25hz, testMagneticFieldUncalibrated_50hz, testMagneticFieldUncalibrated_fastest, testMagneticField_100hz, testMagneticField_200hz, testMagneticField_25hz, testMagneticField_fastest Ref CRACKLING-962 Change-Id: Ia74473d72b2275a3f86e3ff4735b89fd89ddd294 --- sensors/bst/hal/BstSensorInfo.cpp | 6 ++++-- sensors/bst/version/version.c | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/sensors/bst/hal/BstSensorInfo.cpp b/sensors/bst/hal/BstSensorInfo.cpp index 795bd31..920d14f 100755 --- a/sensors/bst/hal/BstSensorInfo.cpp +++ b/sensors/bst/hal/BstSensorInfo.cpp @@ -133,7 +133,8 @@ const struct sensor_t BstSensorInfo::g_bst_sensor_list[] = { maxRange: 1600.0f, resolution: 0.3f, power: 0.5f, - minDelay: 20000, + // THIS SHOULD BE THE VALUE OF CFG_DELAY_M_MIN * 1000! + minDelay: 50000, #if __HAL_VER__ >= __SENSORS_DEVICE_API_VERSION_1_1__ fifoReservedEventCount: 0, fifoMaxEventCount: 0, @@ -398,7 +399,8 @@ const struct sensor_t BstSensorInfo::g_bst_sensor_list[] = { maxRange: 1600.0f, resolution: 0.3f, power: 0.5f, - minDelay: 20000, + // THIS SHOULD BE THE VALUE OF CFG_DELAY_M_MIN * 1000! + minDelay: 50000, #if __HAL_VER__ >= __SENSORS_DEVICE_API_VERSION_1_1__ fifoReservedEventCount: 0, fifoMaxEventCount: 0, diff --git a/sensors/bst/version/version.c b/sensors/bst/version/version.c index 800d9d3..d8a5ce7 100644 --- a/sensors/bst/version/version.c +++ b/sensors/bst/version/version.c @@ -5,7 +5,7 @@ static const char daemon_version_str[] = "3.0.37"; static const char hal_version_str[] = "3.0.15"; -static const char date_str[] = "2015-05-14 15:53:24"; +static const char date_str[] = "2016-02-13 02:03:07"; const char* get_daemon_version(void) { return daemon_version_str;