diff options
author | Nick Vaccaro <nvaccaro@google.com> | 2016-01-07 19:03:31 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2016-01-07 19:03:31 +0000 |
commit | 28a3f11f07c672bd83ab4e4ee4302a8e49a00302 (patch) | |
tree | 106fd8ca19ead6e12e94672531c9b508b98182a6 | |
parent | 2822e4f089684175a0f9dd0faea3fd53863becf7 (diff) | |
parent | f332a4e508430e15266bb7019f7132a7f7eb6dfb (diff) | |
download | invensense-28a3f11f07c672bd83ab4e4ee4302a8e49a00302.tar.gz |
Sensor: Invensense: 6515: fix step counter corrupting event queueandroid-wear-n-preview-3android-wear-n-preview-2android-wear-n-preview-1android-wear-7.1.1_r1android-n-preview-5android-n-preview-4android-n-preview-3android-n-preview-2android-n-iot-preview-2nougat-mr1-wear-releasen-iot-preview-2
am: f332a4e508
* commit 'f332a4e508430e15266bb7019f7132a7f7eb6dfb':
Sensor: Invensense: 6515: fix step counter corrupting event queue
-rw-r--r-- | 6515/libsensors_iio/MPLSensor.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/6515/libsensors_iio/MPLSensor.cpp b/6515/libsensors_iio/MPLSensor.cpp index bf0fdb9..5a57d0b 100644 --- a/6515/libsensors_iio/MPLSensor.cpp +++ b/6515/libsensors_iio/MPLSensor.cpp @@ -3902,6 +3902,7 @@ int MPLSensor::readEvents(sensors_event_t* data, int count) count--; numEventReceived++; data->timestamp = mStepSensorTimestamp; + data++; mLastTimestamp[i] = mStepSensorTimestamp; } else { ALOGE("Event from type=%d with duplicate timestamp %lld discarded", @@ -4565,6 +4566,9 @@ LOGV_IF(INPUT_DATA, LOGV_IF(INPUT_DATA, "HAL:input build step: 1 - %lld", mStepSensorTimestamp); } else { + LOGV_IF(ENG_VERBOSE, "Step data OUT OF ORDER, " + "mPedUpdate = 0x%x last = %lld, ts = %lld", + mPedUpdate, mStepSensorTimestamp, latestTimestamp); mPedUpdate = 0; } } |