summaryrefslogtreecommitdiffstats
path: root/services/sensorservice
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2010-11-22 15:48:10 -0800
committerMathias Agopian <mathias@google.com>2010-11-30 14:07:09 -0800
commit7badd2c402f9e8e9fd13f6915ad2e32301f9f305 (patch)
tree8b63e562633664ac368885c839ea5273c5b00bff /services/sensorservice
parent24754c9f94b1bd8b176456da82a6059b2e8ded0f (diff)
downloadframeworks_base-7badd2c402f9e8e9fd13f6915ad2e32301f9f305.zip
frameworks_base-7badd2c402f9e8e9fd13f6915ad2e32301f9f305.tar.gz
frameworks_base-7badd2c402f9e8e9fd13f6915ad2e32301f9f305.tar.bz2
allow rotation-vector to have 4 components
- upadte documentation for rotation vector - update method dealing with rotation vector to deal with 4 components - virtual rotation-vector sensor reports all four components - improve SensorManager documentation layout Whent he 4-th component of the rotation-vector is present, we can save a square-root when computing the quaternion or rotation matrix from it. Change-Id: Ia84d278dd5f0909fab1c5ba050f8df2679e2c7c8
Diffstat (limited to 'services/sensorservice')
-rw-r--r--services/sensorservice/RotationVectorSensor.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/services/sensorservice/RotationVectorSensor.cpp b/services/sensorservice/RotationVectorSensor.cpp
index eecf260..50cd6be 100644
--- a/services/sensorservice/RotationVectorSensor.cpp
+++ b/services/sensorservice/RotationVectorSensor.cpp
@@ -125,6 +125,7 @@ bool RotationVectorSensor::process(sensors_event_t* outEvent,
outEvent->data[0] = qx;
outEvent->data[1] = qy;
outEvent->data[2] = qz;
+ outEvent->data[3] = qw;
outEvent->sensor = '_rov';
outEvent->type = SENSOR_TYPE_ROTATION_VECTOR;
return true;