summaryrefslogtreecommitdiffstats
path: root/libsensors
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2010-11-08 11:59:02 -0800
committerMathias Agopian <mathias@google.com>2010-11-08 13:15:08 -0800
commit6a4f51ada0ec71cd9f41359146bca3b298bd66a1 (patch)
tree59347c06e3a5d81c9943373e342e8ceee95e9c97 /libsensors
parentff9ac66894939af067597ea00e554d1d84e9f818 (diff)
downloaddevice_samsung_crespo-6a4f51ada0ec71cd9f41359146bca3b298bd66a1.tar.gz
device_samsung_crespo-6a4f51ada0ec71cd9f41359146bca3b298bd66a1.tar.bz2
device_samsung_crespo-6a4f51ada0ec71cd9f41359146bca3b298bd66a1.zip
fix [3175369] gyro X and Y axes inverted
Change-Id: Id9adf56b499c9a5f6b84d1b5796cf10313fd69c7
Diffstat (limited to 'libsensors')
-rw-r--r--libsensors/sensors.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/libsensors/sensors.h b/libsensors/sensors.h
index 008aad2..606ff18 100644
--- a/libsensors/sensors.h
+++ b/libsensors/sensors.h
@@ -74,8 +74,8 @@ __BEGIN_DECLS
#define EVENT_TYPE_PROXIMITY ABS_DISTANCE
#define EVENT_TYPE_LIGHT ABS_MISC
-#define EVENT_TYPE_GYRO_X ABS_RX
-#define EVENT_TYPE_GYRO_Y ABS_RY
+#define EVENT_TYPE_GYRO_X ABS_RY
+#define EVENT_TYPE_GYRO_Y ABS_RX
#define EVENT_TYPE_GYRO_Z ABS_RZ
@@ -104,7 +104,7 @@ __BEGIN_DECLS
// conversion of gyro data to SI units (radian/sec)
#define CONVERT_GYRO ((70.0f / 1000.0f) * ((float)M_PI / 180.0f))
#define CONVERT_GYRO_X (CONVERT_GYRO)
-#define CONVERT_GYRO_Y (CONVERT_GYRO)
+#define CONVERT_GYRO_Y (-CONVERT_GYRO)
#define CONVERT_GYRO_Z (CONVERT_GYRO)
#define SENSOR_STATE_MASK (0x7FFF)