Commit Graph

7 Commits

Author SHA1 Message Date
Peng Xu
2b2e7eff4c Sensor operation parameter update support
This CL supports sensor operation parameter update. Specifically
update of location geomagnetic field information is added.

Local geomagnetic field strength, declination, inclination information
is useful for magnetometer calibration. It also benefits rotation
vector sensor implementation as it gives a baseline that aids detecting
magnetic field disturbance.

Bug: 30958130
Test: Tested with marlin. Modified hal implementation can get local
      geomagnetic field.

Change-Id: I8b717fd8e805d2ac84dd640a670be98116c9418c
2017-03-22 17:57:04 -07:00
Peng Xu
5603662beb Add dynamic sensor extension to nanohub HAL
Dynamic sensor extension to nanohub HAL:
  * Create new device config switch
    NANOHUB_SENSORHAL_DYNAMIC_SENSOR_EXT_ENABLED to control
    inclusion of dynamic sensor extension.
  * Add interface code to DynamicSensorManager.
  * Add dispatcher pattern to distribute sensor operation to
    the correct entity.

Test: run cts tests about dynamic sensors,
      checked basic sensor functionality using sensorlogger

Change-Id: I3180fa1d7de04b8c18ec2b3436ed998311785423
2017-03-07 20:42:25 -08:00
Peng Xu
cf5df9cf40 Implement sensor direct report mode
This change implements direct report for accel, gyro and mag at normal
and fast rate level. It supports ashmem shared memory.

The direct report and traditional sensor subscription are still
tangled up in this implementation.

Bug: 30985702
Bug: 33588372
Test: tested via demo app

Change-Id: Idc4f626dfe624558718c1b04f16898a0ea247e62
2017-01-24 22:50:14 +00:00
Andrew Rossignol
2b9311a5a6 sensorhal: remove unnecessary flags argument
Change-Id: I5d659bbc670aae9e8938ed87773fc40487a3fb7b
2016-07-06 17:20:16 -07:00
Andrew Rossignol
d82bf31ea8 sensorhal: adds separate sensor lists for devices
This change adds support for a different sensor list depending
on the type of device.

Bug: 27943736
Change-Id: Id8c30b9b72084576d11546a663de7327fb29d76f
2016-03-31 18:25:44 -07:00
Greg Kaiser
8bd00054b8 contexthub: Use 'explicit' keyword.
We use the C++ keyword 'explicit' on our single argument
constructors to avoid accidental implicit conversion.

Change-Id: Icf16954ece9b56d401846e74721f0406d4ed9f29
2016-02-25 12:06:16 -08:00
Trevor Bunker
21f2c7c52a sensorhal: migrate from vendor/google_contexthub and google_chinook
- Original authors for hubconnection: Ben Fennema (fennema@google.com),
  Andreas Huber (andih@google.com), Trevor Bunker
  (trevorbunker@google.com), and Andrew Rossignol (aaross@google.com)
- Original authors for other files: Andreas Huber (andih@google.com),
  Trevor Bunker (trevorbunker@google.com), and Meng-hsuan Chung
  (menghsuan@google.com)

Change-Id: I4b1097b80315135949f0713103c61793b92126c2
2016-02-25 06:34:43 -08:00