4715d1734d2c60cc91ef70d409678d8eda382fde |
|
04-Apr-2017 |
Peng Xu <pengxu@google.com> |
HID dynamic sensor: add support to three types of sensor Implemented HID dynamic sensor using linux hidraw driver and HidUtils. Support the following cases: 1) HID Sensor spec defined accelerometer, gyroscope, magnetometer and orientation (quaternion). 2) Android defined type sensors (HID sensor custom type): ambient temperature, barometer, light and heart rate sensor. 3) Android custom type sensor (based on HID sensor custom type). Test: run tests/examples in test/ Test: test with a USB HID hardware (launchpad sensor) and marlin Bug: 37482951 Bug: 31026607 Change-Id: I9d679fb34d15324a9df1cf19647ea638fd1a0e68
/hardware/libhardware/modules/sensors/dynamic_sensor/BaseDynamicSensorDaemon.cpp
|
18082bd61fffd120100ea93fd94538492b39d7bd |
|
20-Jan-2017 |
Peng Xu <pengxu@google.com> |
Dynamic sensor manager -- implementation of basic sensor daemon Library to handle dynamic sensor connection. There are two way to use this: as hal extension or standalone hal module. In hal extension mode: add libdynamic_sensor_ext in dependency of hal, instantiate DynamicSensorManager with appropriate parameters. Then for all sensor requests, if the handle is owned by dynamic sensor manager, forward the request. In standalone mode, add sensor.dynamic_sensor_hal into device make file. Usually, this also means multihal is necessary. Add sensor.dynamic_sensor_hal into multihal configuration file. A dummy sensor module is included for testing. Test: tested with cts dynamics sensor related test and demo app. also verified sensor basic operation with sensor logger. Change-Id: I16612935fc21b06c173aca875401ece37c6bde01
/hardware/libhardware/modules/sensors/dynamic_sensor/BaseDynamicSensorDaemon.cpp
|