diff options
Diffstat (limited to 'libsensors_iio/src/SensorHAL.cpp')
-rw-r--r-- | libsensors_iio/src/SensorHAL.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libsensors_iio/src/SensorHAL.cpp b/libsensors_iio/src/SensorHAL.cpp index 15366db..90f1931 100644 --- a/libsensors_iio/src/SensorHAL.cpp +++ b/libsensors_iio/src/SensorHAL.cpp @@ -584,12 +584,12 @@ st_hal_load_free_iio_sysfs_path: static int st_hal_dev_flush(struct sensors_poll_device_1 *dev, int handle) { STSensorHAL_data *hal_data = (STSensorHAL_data *)dev; - ALOGD("st_hal_dev_flush type=%d", ((struct sensor_t) hal_data->sensor_t_list[handle]).type); + ALOGD("st_hal_dev_flush type=%u", ((struct sensor_t) hal_data->sensor_t_list[handle-1]).type); /* One-shot sensor must return -EINVAL and not generate any flush complete metadata event */ - if (SENSOR_TYPE_SIGNIFICANT_MOTION == ((struct sensor_t) hal_data->sensor_t_list[handle]).type) + if (SENSOR_TYPE_SIGNIFICANT_MOTION == ((struct sensor_t) hal_data->sensor_t_list[handle-1]).type) return -EINVAL; - return hal_data->sensor_classes[handle]->FlushData(); + return hal_data->sensor_classes[handle]->FlushData(1); } /** |