summaryrefslogtreecommitdiff
path: root/libsensors_iio/src/SensorHAL.cpp
diff options
context:
space:
mode:
authorFei Li <feix.f.li@intel.com>2015-06-15 13:38:41 +0800
committerZhengyin Qian <qianzy@google.com>2015-07-28 12:20:06 -0700
commitf75e2d216835d8354543b80a213011d721478826 (patch)
tree40db9f2ec55004a82b3c701af3248917f24cf6ec /libsensors_iio/src/SensorHAL.cpp
parent94781c7ca4a5c935ed25d96d9228525ca072fddd (diff)
downloadsensors-f75e2d216835d8354543b80a213011d721478826.tar.gz
Sensor: load calibration data at boot
JIRA: MARVIN-79 Load sensors calibration data at boot, and set the corresponding offset of IIO channels to calibrate raw data of sensors Change-Id: Iaf5842fd46edd8445a0a2ba03e765fa82a4f0519 Signed-off-by: Fei Li <feix.f.li@intel.com> Reviewed-on: https://android.intel.com/379867 Reviewed-by: jenkins_ndg <jenkins_ndg@intel.com> Reviewed-by: Marcenac, GuillaumeX <guillaumex.marcenac@intel.com> Reviewed-by: Tasayco Loarte, VictorX <victorx.tasayco.loarte@intel.com> Reviewed-by: Maalem, Saadi <saadi.maalem@intel.com> Reviewed-by: Yan, Like <like.yan@intel.com> Tested-by: Yan, Like <like.yan@intel.com>
Diffstat (limited to 'libsensors_iio/src/SensorHAL.cpp')
-rw-r--r--libsensors_iio/src/SensorHAL.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/libsensors_iio/src/SensorHAL.cpp b/libsensors_iio/src/SensorHAL.cpp
index 6cba89d..e25771f 100644
--- a/libsensors_iio/src/SensorHAL.cpp
+++ b/libsensors_iio/src/SensorHAL.cpp
@@ -745,6 +745,9 @@ static int st_hal_open_sensors(const struct hw_module_t *module,
hal_data->poll_device.batch = st_hal_dev_batch;
hal_data->poll_device.flush = st_hal_dev_flush;
+ do_cal_data_loading(ACCEL_SINDEX);
+ do_cal_data_loading(GYRO_SINDEX);
+
*device = &hal_data->poll_device.common;
device_found_num = st_hal_load_iio_devices_data(iio_devices_data);