summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Vaccaro <nvaccaro@google.com>2016-01-07 19:03:31 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-01-07 19:03:31 +0000
commit28a3f11f07c672bd83ab4e4ee4302a8e49a00302 (patch)
tree106fd8ca19ead6e12e94672531c9b508b98182a6
parent2822e4f089684175a0f9dd0faea3fd53863becf7 (diff)
parentf332a4e508430e15266bb7019f7132a7f7eb6dfb (diff)
downloadinvensense-28a3f11f07c672bd83ab4e4ee4302a8e49a00302.tar.gz
am: f332a4e508 * commit 'f332a4e508430e15266bb7019f7132a7f7eb6dfb': Sensor: Invensense: 6515: fix step counter corrupting event queue
-rw-r--r--6515/libsensors_iio/MPLSensor.cpp4
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;
}
}