diff options
author | Ching Tzung Lin <ctlin@google.com> | 2015-07-24 20:48:29 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-07-24 20:48:29 +0000 |
commit | 8e81112b8b38d9294a56587b85e08205ad15ef90 (patch) | |
tree | 3c47f9c233d06090025e867d77de6f93873edfe1 | |
parent | fee89ba683d594140db7d38abb340deb8e2e239d (diff) | |
parent | 980569f04a36cc492e61c357a1c06d2386b0586f (diff) | |
download | invensense-8e81112b8b38d9294a56587b85e08205ad15ef90.tar.gz |
Merge "Fix compilation error on emerald-dev" into cw-e-dev
-rwxr-xr-x | 6515/libsensors_iio/InputEventReader.cpp | 1 | ||||
-rw-r--r-- | 6515/libsensors_iio/MPLSensor.cpp | 37 | ||||
-rwxr-xr-x | 6515/libsensors_iio/SensorBase.cpp | 1 | ||||
-rwxr-xr-x | 6515/libsensors_iio/sensors_mpl.cpp | 9 |
4 files changed, 31 insertions, 17 deletions
diff --git a/6515/libsensors_iio/InputEventReader.cpp b/6515/libsensors_iio/InputEventReader.cpp index 968e32e..5ec3e6c 100755 --- a/6515/libsensors_iio/InputEventReader.cpp +++ b/6515/libsensors_iio/InputEventReader.cpp @@ -20,6 +20,7 @@ #include <errno.h> #include <unistd.h> #include <poll.h> +#include <string.h> #include <sys/cdefs.h> #include <sys/types.h> diff --git a/6515/libsensors_iio/MPLSensor.cpp b/6515/libsensors_iio/MPLSensor.cpp index 1061598..0ef2c95 100644 --- a/6515/libsensors_iio/MPLSensor.cpp +++ b/6515/libsensors_iio/MPLSensor.cpp @@ -117,20 +117,6 @@ MPLSensor::MPLSensor(CompassSensor *compass, int (*m_pt2AccelCalLoadFunc)(long * mAccelBiasApplied(false), mPendingMask(0), mSensorMask(0), - mMplFeatureActiveMask(0), - mFeatureActiveMask(0), - mDmpOn(0), - mPedUpdate(0), - mPressureUpdate(0), - mQuatSensorTimestamp(0), - mStepSensorTimestamp(0), - mLastStepCount(-1), - mLeftOverBufferSize(0), - mInitial6QuatValueAvailable(0), - mFlushBatchSet(0), - mSkipReadEvents(0), - mDataMarkerDetected(0), - mEmptyDataMarkerDetected(0), mGyroBatchRate(0), mAccelBatchRate(0), mCompassBatchRate(0), @@ -144,7 +130,20 @@ MPLSensor::MPLSensor(CompassSensor *compass, int (*m_pt2AccelCalLoadFunc)(long * mResetRate(0), mDataInterrupt(0), mFirstBatchCall(1), - mEnableCalled(1) { + mEnableCalled(1), + mMplFeatureActiveMask(0), + mFeatureActiveMask(0), + mDmpOn(0), + mPedUpdate(0), + mPressureUpdate(0), + mQuatSensorTimestamp(0), + mStepSensorTimestamp(0), + mLastStepCount(-1), + mLeftOverBufferSize(0), + mInitial6QuatValueAvailable(0), + mSkipReadEvents(0), + mDataMarkerDetected(0), + mEmptyDataMarkerDetected(0) { VFUNC_LOG; inv_error_t rv; @@ -5760,7 +5759,11 @@ int MPLSensor::batch(int handle, int flags, int64_t period_ns, int64_t timeout) LOGV_IF(PROCESS_VERBOSE, "HAL:batch after applying upper and lower limit: %llu ns, (%.2f Hz)", - period_ns, 1000000000.f / period_ns); + period_ns, 1000000000.f / period_ns); + + LOGV_IF(PROCESS_VERBOSE, + "HAL:batch after applying upper and lower limit: %llu ns, (%.2f Hz)", + period_ns, 1000000000.f / period_ns); switch (what) { case Gyro: @@ -6544,7 +6547,7 @@ int MPLSensor::calcBatchDataRates(int64_t *gyro_rate, int64_t *accel_rate, int64 #ifdef ENABLE_PRESSURE int64_t pressureRate; #endif - int64_t quatRate; + int64_t quatRate = 0; int mplGyroRate; int mplAccelRate; diff --git a/6515/libsensors_iio/SensorBase.cpp b/6515/libsensors_iio/SensorBase.cpp index f1d00fb..16057ff 100755 --- a/6515/libsensors_iio/SensorBase.cpp +++ b/6515/libsensors_iio/SensorBase.cpp @@ -24,6 +24,7 @@ #include <sys/select.h> #include <cutils/log.h> #include <linux/input.h> +#include <string.h> #include <cutils/properties.h> diff --git a/6515/libsensors_iio/sensors_mpl.cpp b/6515/libsensors_iio/sensors_mpl.cpp index 7e7b06b..c55e86c 100755 --- a/6515/libsensors_iio/sensors_mpl.cpp +++ b/6515/libsensors_iio/sensors_mpl.cpp @@ -81,6 +81,14 @@ static struct hw_module_methods_t sensors_module_methods = { open: open_sensors }; +static int sensors_set_operation_mode(unsigned int mode) +{ + LOGI("%s", __FUNCTION__); + LOGI("%s: stub function: ignoring mode request (%d)", __FUNCTION__, + mode); + return 0; +} + struct sensors_module_t HAL_MODULE_INFO_SYM = { common: { tag: HARDWARE_MODULE_TAG, @@ -94,6 +102,7 @@ struct sensors_module_t HAL_MODULE_INFO_SYM = { reserved: {0} }, get_sensors_list: sensors__get_sensors_list, + set_operation_mode: sensors_set_operation_mode }; struct sensors_poll_context_t { |