OSDN Git Service

Add support for virtual sensors.
authorMathias Agopian <mathias@google.com>
Fri, 12 Nov 2010 01:58:51 +0000 (17:58 -0800)
committerMathias Agopian <mathias@google.com>
Thu, 18 Nov 2010 23:29:05 +0000 (15:29 -0800)
commit671a6ff4be11b3e2d8eb017e0c7a78e6133fb2b8
tree569c08c41c6c810c99395279283f6e1c812fc51d
parent80381ab4ed44bd69c3e3464a848ca15851365b03
Add support for virtual sensors.

Rework sensorservice to allow "virtual sensors", that is
sensors that report a synthetized value based on real sensors.

the main change to sensorservice is around managing which real
sensor need to be activated and which rate to use.

The logic for all this has been moved into SensorDevice, which
essentially wraps the sensor HAL but adds two features to it:
- it keeps track of which sensors need to be activated
- it keeps track of what rate needs to be used

For this purpose an "identity" is associated with each real sensor
activation, so we can track them.

On start-up we check for gravity, linear-acceleration and
rotation-vector sensors, if they're not present in the HAL, we
synthetize them in sensor-service.

Change-Id: I841db2c1b37ef127ed571efa21732ecc5adf1800
15 files changed:
services/sensorservice/Android.mk
services/sensorservice/GravitySensor.cpp [new file with mode: 0644]
services/sensorservice/GravitySensor.h [new file with mode: 0644]
services/sensorservice/LinearAccelerationSensor.cpp [new file with mode: 0644]
services/sensorservice/LinearAccelerationSensor.h [new file with mode: 0644]
services/sensorservice/RotationVectorSensor.cpp [new file with mode: 0644]
services/sensorservice/RotationVectorSensor.h [new file with mode: 0644]
services/sensorservice/SecondOrderLowPassFilter.cpp [new file with mode: 0644]
services/sensorservice/SecondOrderLowPassFilter.h [new file with mode: 0644]
services/sensorservice/SensorDevice.cpp [new file with mode: 0644]
services/sensorservice/SensorDevice.h [new file with mode: 0644]
services/sensorservice/SensorInterface.cpp [new file with mode: 0644]
services/sensorservice/SensorInterface.h [new file with mode: 0644]
services/sensorservice/SensorService.cpp
services/sensorservice/SensorService.h