summaryrefslogtreecommitdiff
path: root/60xx/libsensors_iio/MPLSensor.cpp
diff options
context:
space:
mode:
Diffstat (limited to '60xx/libsensors_iio/MPLSensor.cpp')
-rw-r--r--60xx/libsensors_iio/MPLSensor.cpp24
1 files changed, 0 insertions, 24 deletions
diff --git a/60xx/libsensors_iio/MPLSensor.cpp b/60xx/libsensors_iio/MPLSensor.cpp
index d070231..0aa6556 100644
--- a/60xx/libsensors_iio/MPLSensor.cpp
+++ b/60xx/libsensors_iio/MPLSensor.cpp
@@ -588,8 +588,6 @@ void MPLSensor::loadDMP()
LOGV_IF(PROCESS_VERBOSE, "HAL:DMP loaded");
}
fclose(fptr);
-
- // onDMP(1); //Can't enable here. See note onDMP()
}
void MPLSensor::inv_get_sensors_orientation()
@@ -742,7 +740,6 @@ int MPLSensor::setAccelInitialState()
mPendingEvents[Accelerometer].data[1] = value * CONVERT_A_Y;
value = absinfo_z.value;
mPendingEvents[Accelerometer].data[2] = value * CONVERT_A_Z;
- //mHasPendingEvent = true;
}
return 0;
}
@@ -1357,9 +1354,6 @@ int MPLSensor::enable(int32_t handle, int en)
LOGV_IF(PROCESS_VERBOSE,
"HAL:%s sensor state change what=%d", sname.string(), what);
- // pthread_mutex_lock(&mMplMutex);
- // pthread_mutex_lock(&mHALMutex);
-
if ((uint32_t(newState) << what) != (mEnabled & (1 << what))) {
short flags = newState;
uint32_t lastEnabled = mEnabled, changed = 0;
@@ -1407,9 +1401,6 @@ int MPLSensor::enable(int32_t handle, int en)
enableSensors(sen_mask, flags, changed);
}
- // pthread_mutex_unlock(&mMplMutex);
- // pthread_mutex_unlock(&mHALMutex);
-
#ifdef INV_PLAYBACK_DBG
/* apparently the logging needs to be go through this sequence
to properly flush the log file */
@@ -1543,9 +1534,7 @@ int MPLSensor::setDelay(int32_t handle, int64_t ns)
break;
}
- // pthread_mutex_lock(&mHALMutex);
int res = update_delay();
- // pthread_mutex_unlock(&mHALMutex);
return res;
}
@@ -1868,12 +1857,8 @@ int MPLSensor::readEvents(sensors_event_t* /*data*/, int /*count*/) {
}
}
- // pthread_mutex_lock(&mMplMutex);
- // pthread_mutex_lock(&mHALMutex);
-
ssize_t rsize = read(iio_fd, rdata, nbyte);
if (sensors == 0) {
- // read(iio_fd, rdata, nbyte);
rsize = read(iio_fd, rdata, sizeof(mIIOBuffer));
}
@@ -2015,9 +2000,6 @@ int MPLSensor::readEvents(sensors_event_t* /*data*/, int /*count*/) {
mCachedQuaternionData[2], mCachedQuaternionData[3], mSensorTimestamp);
}
- // pthread_mutex_unlock(&mMplMutex);
- // pthread_mutex_unlock(&mHALMutex);
-
return numEventReceived;
}
@@ -2032,9 +2014,6 @@ int MPLSensor::readCompassEvents(sensors_event_t* /*data*/, int count)
int numEventReceived = 0;
int done = 0;
- // pthread_mutex_lock(&mMplMutex);
- // pthread_mutex_lock(&mHALMutex);
-
done = mCompassSensor->readSample(mCachedCompassData, &mCompassTimestamp);
#ifdef COMPASS_YAS53x
if (mCompassSensor->checkCoilsReset()) {
@@ -2057,9 +2036,6 @@ int MPLSensor::readCompassEvents(sensors_event_t* /*data*/, int count)
}
}
- // pthread_mutex_unlock(&mMplMutex);
- // pthread_mutex_unlock(&mHALMutex);
-
return numEventReceived;
}