accel: Apply scale for IIO buffered acceleration

Always apply the scale from the IIO readings. This fixes acceleration
values on the Dell Venue 11 Pro (7140) tablet.
This commit is contained in:
Jan-Michael Brummer
2015-07-10 22:24:05 +02:00
committed by Bastien Nocera
parent d79eb01412
commit 0975741edb

View File

@@ -67,9 +67,9 @@ process_scan (IIOSensorData data, DrvData *or_data)
accel_y = -accel_y;
//FIXME report errors
readings.accel_x = accel_x;
readings.accel_y = accel_y;
readings.accel_z = accel_z;
readings.accel_x = accel_x * scale;
readings.accel_y = accel_y * scale;
readings.accel_z = accel_z * scale;
or_data->callback_func (&iio_buffer_accel, (gpointer) &readings, or_data->user_data);
return 1;