Commit Graph

2 Commits

Author SHA1 Message Date
Brian Duddie
7aad531bc9 dynamic_sensor: Improve error logging
Correctly pass errno to strerror() rather than the return value, which
will always be -1 on error.

Fixes: 245585769
Test: build only
Change-Id: Iae1170949f3b2a0286ef8b9ddf26c74a6cee6783
2022-09-07 19:46:32 +00:00
Peng Xu
4715d1734d 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
2017-04-20 23:23:53 +00:00