aboutsummaryrefslogtreecommitdiffstats
path: root/libsensors
diff options
context:
space:
mode:
authorRGIB <gibellini.roberto@gmail.com>2016-12-09 22:53:53 +0100
committerRGIB <gibellini.roberto@gmail.com>2016-12-09 22:53:53 +0100
commitb70ebd3644a8eb0444cfa9ac9a046d24a0e65f34 (patch)
tree940cf6ea5860700eb23095837f42b5ce2ea0a884 /libsensors
parent92076a102ac0d569334c5b6295126f5b96fd6637 (diff)
downloaddevice_samsung_kona-common-b70ebd3644a8eb0444cfa9ac9a046d24a0e65f34.zip
device_samsung_kona-common-b70ebd3644a8eb0444cfa9ac9a046d24a0e65f34.tar.gz
device_samsung_kona-common-b70ebd3644a8eb0444cfa9ac9a046d24a0e65f34.tar.bz2
kona : correct magnetometer values
Change-Id: I6a74ad728743b72d2b728f95d5f01286a23b7293
Diffstat (limited to 'libsensors')
-rw-r--r--libsensors/CompassSensor.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/libsensors/CompassSensor.cpp b/libsensors/CompassSensor.cpp
index 270e205..82e16a3 100644
--- a/libsensors/CompassSensor.cpp
+++ b/libsensors/CompassSensor.cpp
@@ -164,11 +164,11 @@ int CompassSensor::readEvents(sensors_event_t* data, int count)
if (type == EV_ABS) {
float value = event->value;
if (event->code == EVENT_TYPE_MAGV_X) {
- mPendingEvent.magnetic.x = (float)value / 1000.0f;
+ mPendingEvent.magnetic.x = (float)value / 20000.0f;
} else if (event->code == EVENT_TYPE_MAGV_Y) {
- mPendingEvent.magnetic.y = (float)value / 1000.0f;
+ mPendingEvent.magnetic.y = (float)value / 20000.0f;
} else if (event->code == EVENT_TYPE_MAGV_Z) {
- mPendingEvent.magnetic.z = (float)value / 1000.0f;
+ mPendingEvent.magnetic.z = (float)value / 20000.0f;
}
} else if (type == EV_SYN) {
mPendingEvent.timestamp = timevalToNano(event->time);