summaryrefslogtreecommitdiff
path: root/6515
diff options
context:
space:
mode:
authorNick Vaccaro <nvaccaro@google.com>2014-05-01 13:52:22 -0700
committerNick Vaccaro <nvaccaro@google.com>2014-05-02 14:01:44 -0700
commit56fa6bff099c045ff4241c156309c6d94ac03f49 (patch)
tree35906c2a74f3a7f0ae9eb8e5421a2195d0e2f7e1 /6515
parentb15903ff47c3d5234f14919941b36bf26a96a82e (diff)
downloadinvensense-56fa6bff099c045ff4241c156309c6d94ac03f49.tar.gz
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
Diffstat (limited to '6515')
-rw-r--r--6515/libsensors_iio/MPLSensor.cpp9
1 files changed, 7 insertions, 2 deletions
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)