mirror of
https://github.com/team-infusion-developers/android_hardware_samsung.git
synced 2024-11-06 21:55:41 +00:00
sensors: Fix conversion values
Our kernel sets the gyro to 500 DPS and not 2000 DPS. In addition, X and Y are swapped and Y is not inverted. Also change the orientation sensor conversion factors to match that found in aries-common since the orientation sensor seemed overly sensitive. However, the orientation sensor might not actually do anything... Android may be performing sensor fusion of other data to determine orientation. Change-Id: I03df5d7bac9d58881e360546af4cf77878802807
This commit is contained in:
parent
827f2f953c
commit
cbf1cb2a7f
1 changed files with 7 additions and 7 deletions
|
@ -101,8 +101,8 @@ __BEGIN_DECLS
|
|||
#define EVENT_TYPE_PROXIMITY ABS_DISTANCE
|
||||
#define EVENT_TYPE_LIGHT ABS_MISC
|
||||
|
||||
#define EVENT_TYPE_GYRO_X REL_RY
|
||||
#define EVENT_TYPE_GYRO_Y REL_RX
|
||||
#define EVENT_TYPE_GYRO_X REL_RX
|
||||
#define EVENT_TYPE_GYRO_Y REL_RY
|
||||
#define EVENT_TYPE_GYRO_Z REL_RZ
|
||||
|
||||
// 90 LSB = 1G for KR3DM
|
||||
|
@ -123,16 +123,16 @@ __BEGIN_DECLS
|
|||
#define CONVERT_M_Z (CONVERT_M)
|
||||
|
||||
/* conversion of orientation data to degree units */
|
||||
#define CONVERT_O (1.0f/64.0f)
|
||||
#define CONVERT_O (1.0f/1000.0f)
|
||||
#define CONVERT_O_A (CONVERT_O)
|
||||
#define CONVERT_O_P (CONVERT_O)
|
||||
#define CONVERT_O_R (-CONVERT_O)
|
||||
#define CONVERT_O_R (CONVERT_O)
|
||||
|
||||
// conversion of gyro data to SI units (radian/sec)
|
||||
#define RANGE_GYRO (2000.0f*(float)M_PI/180.0f)
|
||||
#define CONVERT_GYRO ((70.0f / 1000.0f) * ((float)M_PI / 180.0f))
|
||||
#define RANGE_GYRO (500.0f*(float)M_PI/180.0f)
|
||||
#define CONVERT_GYRO ((70.0f / 4000.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)
|
||||
|
|
Loading…
Reference in a new issue