diff options
-rw-r--r-- | 6515/libsensors_iio/MPLSensor.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/6515/libsensors_iio/MPLSensor.cpp b/6515/libsensors_iio/MPLSensor.cpp index 5896a22..737fefb 100644 --- a/6515/libsensors_iio/MPLSensor.cpp +++ b/6515/libsensors_iio/MPLSensor.cpp @@ -1776,7 +1776,6 @@ int MPLSensor::enableDmpPedometer(int en, int interruptMode) } else { mFeatureActiveMask |= INV_DMP_PEDOMETER_STEP; - mStepCountPollTime = 100000000LL; } clock_gettime(CLOCK_MONOTONIC, &mt_pre); @@ -5587,6 +5586,12 @@ int MPLSensor::batch(int handle, int flags, int64_t period_ns, int64_t timeout) return 0; } + if (what == StepCounter) { + mStepCountPollTime = period_ns; + LOGI("HAL: set step count poll time = %lld nS (%.2f Hz)", + mStepCountPollTime, 1000000000.f / mStepCountPollTime); + } + int tempBatch = 0; if (timeout > 0) { tempBatch = mBatchEnabled | (1 << what); |