From 56fa6bff099c045ff4241c156309c6d94ac03f49 Mon Sep 17 00:00:00 2001 From: Nick Vaccaro Date: Thu, 1 May 2014 13:52:22 -0700 Subject: Invensense: 6515: remove hard-coded pedometer poll time Previous code returned a hard-coded constant of 100mS when asked for pedometer polling time; change to use mStepCountPollTime instead. Bug: 14299562 Change-Id: I0e99f8b61da36093e6014cafe44088affbfb9033 --- 6515/libsensors_iio/MPLSensor.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to '6515') diff --git a/6515/libsensors_iio/MPLSensor.cpp b/6515/libsensors_iio/MPLSensor.cpp index e211bbe..5896a22 100644 --- a/6515/libsensors_iio/MPLSensor.cpp +++ b/6515/libsensors_iio/MPLSensor.cpp @@ -4545,8 +4545,13 @@ int MPLSensor::getPollTime(void) int MPLSensor::getStepCountPollTime(void) { VFUNC_LOG; - /* clamped to 1ms? as spec, still rather large */ - return 100; + if (mDmpStepCountEnabled) { + LOGV_IF(0, "Step Count poll time = %lld ms", + mStepCountPollTime / 1000000LL); + // convert poll time from nS to mS + return (mStepCountPollTime / 1000000LL); + } + return 1000; } bool MPLSensor::hasStepCountPendingEvents(void) -- cgit v1.2.3