Commit graph

15 commits

Author SHA1 Message Date
Arthur Ishiguro
fa2fcddb09 Adds conversion for quaternion data with accuracy
Also applies formatter.

Bug: 116874058
Test: Compile and verify apps can receive the accuracy
      field

Change-Id: I2535a5a9315ac3d343dcdf6010d3ae74288dfcd4
2018-11-01 17:33:22 -07:00
Peng Xu
967de22a44 Zero uninitialized field in conversion and fix vts bug
am: 36665b1b3d

Change-Id: I9c3aa0350b90f52abb12b4c88f10ab43e82ab65b
2017-06-20 00:08:44 +00:00
Peng Xu
36665b1b3d Zero uninitialized field in conversion and fix vts bug
Zero uninitialized sensor event field to zero to avoid undefined
value being passed to framework.

Correct sensor report type check bug in vts.

Bug: 37793558
Bug: 37710268
Test: sensor vts passes
Change-Id: I5042975fea8fe28ae130367ba083a4e4f4e5657e
2017-06-19 20:39:48 +00:00
Peng Xu
fb6f02bd23 Only convert valid SharedMemInfo
This CL avoids passing nullptr to underlying HAL and cause
SEGFAULT.

Bug: 37589989
Test: compiles and VTS passing
Change-Id: Ic44409e64466e54a3a3027721897c0755ba34fc7
2017-05-04 17:14:42 -07:00
Ben Fennema
b2969d4eaa Add missing LOW_LATENCY_OFFBODY_DETECT handling
Bug: 36580454
Test: unlock watch with LLOB sensor and verify no SensorService crash
Change-Id: Ib1d086efd80e829bb844521fa39325f095b1c2c9
Signed-off-by: Ben Fennema <fennema@google.com>
2017-03-24 19:23:51 -07:00
Steven Moreland
5f81564de2 Revert "Revert "Revert "Protect against null strings in hal wrapper implementation."""
This reverts commit 8dbdf39b9a.

Bug: 35421240

Change-Id: I4dc6934d79b1822d500cffaf91f9812387413707
2017-02-28 18:33:48 +00:00
Steven Moreland
8dbdf39b9a Revert "Revert "Protect against null strings in hal wrapper implementation.""
This reverts commit 4cc22a0bc8.

Reason for revert: Accidental +2, still waiting on: aosp 345923

Change-Id: I57e062b267ad54632c6d7fcd464c7a0dd773de33
2017-02-28 17:53:43 +00:00
Steven Moreland
4cc22a0bc8 Revert "Protect against null strings in hal wrapper implementation."
This reverts commit 6909bfd8ee.

Updated sense null strings are now allowed in hidl as of Iada25da5407c3eccdd28704d993ffdee8b15c5fe.

Bug: 35421240

Change-Id: Ied1745ba7169b2e4bc0a20000503e47172538f08
2017-02-28 16:57:17 +00:00
Ashutosh Joshi
6909bfd8ee Protect against null strings in hal wrapper implementation.
Some HALs may provide null pointers in lieu of empty strings.
Avoid simple copies of these strings.

Bug: 35384551
Test: Verify affected device (Pixel-C) boots and auto-rotate works.
Change-Id: I37ab6e781d6dfdcc1667bcc0467690f7c2c9a557
2017-02-15 17:29:19 -08:00
Ashutosh Joshi
da270a09f4 Fix shim layer bugs for Sensors HIDL wrapper.
i) Increase the number of default threads to 2.
ii) Handle the flush complete event correctly.

Bug: 35189074
Bug: 35067266

Test: Test that sensors work in both binderized and passthrough modes.
      Ensure that camera photosphere works.

Change-Id: Ic8dadf03395b4e96092ae962cf790c93d65a1c8d
2017-02-14 11:36:40 -08:00
Peng Xu
89df2e7064 [sensors] Default implementation and vts of direct report
Added support for newly added HAL function for sensor event direct
report feature, replace dummy implementation with funtional ones for
the following:

  * registerDirectChannel
  * unregisterDirectChannel
  * configDirectReport

Added a vts test case for direct report.

Added new offset definition to types.hal. This will not affect
existing client/calling code.

Bug: 30985702
Bug: 32022776

Test: vts pass

Change-Id: Ie5e3cddd7c37664e8c59d69cf70aaa1310fd3f58
2017-01-18 14:28:21 -08:00
Peng Xu
1f12c7a338 [sensors] Minor tuning of hal definition
* Swap GEOMAGNETIC_FIELD with MAGNETIC_FIELD for more accurate
    definition.
  * Remove redundunt prefixes in various enum definitions.
  * Clarify that string type will be removed for well defined sensor
    types. This avoid dependency on strings defined in sensors.h.
  * Added SensorFlagShift enum.
  * Remove unused flag parameter in batch.
  * Remove legacy setDelay function.
  * Change the type of sensor flag to bitfield<SensorFlagBits>, and
    use uint32_t since only low 32 bits are used.

Test: all sensor works(in marlin), tested with sensorlogger.

Change-Id: I93a4d13c5d2e054857d1e400d15002aeb9a47368
2017-01-14 05:42:13 +00:00
Ashutosh Joshi
4faa8c70be Add the uncalibrated accelerometer sensor type.
Adding the uncalibrated accelerometer sensor.

Test: Update makefiles.
Change-Id: I7f6bc3ce69264b698836946bf9fb820ce9959b01
2017-01-11 17:53:11 -08:00
Steven Moreland
cefd01cd41 Sensors: cleanup includes in default implemenation
Test: compiles
Change-Id: Ib0aa43c186a4626117ed6b19a3881cb1822a5cdc
2016-11-07 19:20:19 -08:00
Andreas Huber
db49a41180 sensor HAL v3
Bug: 32021636
Test: no
Change-Id: I7a4c5c47f8621209daef5af4d0dcbb806a236e41
2016-10-13 09:21:46 -07:00