Commit Graph

95 Commits

Author SHA1 Message Date
Colin Cross
cc8d9f9fcb Avoid C-style cast warnings
hardware/libhardware/include was being included with -isystem, which
hides warnings.  Use a macro to convert modules to hw_device_t** to call
the open function that works in C++ and C.

Bug: 32018017
Test: m -j
Change-Id: If68bf15581975f1217fcab366cef7bc784894641
2016-10-07 13:10:20 -07:00
Colin Cross
867e1e3043 Fix doc warnings
hardware/libhardware/include was being included with -isystem, which
hides warnings.  Fix use of doxygen function comments on on function
pointers, which are not considered functions or methods.

Bug: 32018017
Test: m -j
Change-Id: I71a1d33a9ae90b646bf22f32e052bbe22e8aca76
2016-10-07 13:10:07 -07:00
Peng Xu
aaeeaa41bd [sensor] Clarification of sensor HAL behavior at deactivation
Sensor HAL should abandon stale data at deactivation.

Test: documentation change, spell checked.
Bug: 28443809

Change-Id: I29b1d324fc96d0448cdefbf2130161f71c3d3310
2016-10-05 15:17:33 -07:00
Peng Xu
69b5dba69c [sensor] clarify definition of the uuid field
Add description of the byte order the uuid field should use along
with an expample.

Bug: 28305085
Change-Id: If607631f15c1611bd51b158bd80eac1eef331b4b
2016-04-26 19:04:01 +00:00
Peng Xu
d156299686 Add two sensor flags
Add sensor flag for indication of dynamically added sensor and
support of additional information.

Change-Id: I02ee7d6d325f6cb04f371bcde6bb755f52720671
2016-03-30 15:58:39 -07:00
Peng Xu
0743a5ceeb Implementation of sensor additional info report
This implements a mechanism for sensor hardware/HAL to deliver additional information beside sensor
readings to application. It includes internal temperature reading, untracked delay of sample,
location and pose of sensor device placement in phone frame, etc. This is also a very expandable
frame to account for future need.

Change-Id: I9463930ad1eaac2d9b506ebaabd19bc092604e8f
2016-01-27 21:20:07 -08:00
Peng Xu
e20707ad87 Fix build caused by "bool connect"
Change-Id: Ibc0bc984aebff6ae512c11bfe3cb1d1a18845a78
2016-01-27 18:26:10 -08:00
Peng Xu
e641ba987a Dynamic sensor related definitions
Defined the dynamic sensor meta data type and UUID of sensor.

Change-Id: I54385bf70c366057d07ea049def1073cd8a35166
2016-01-27 16:44:34 -08:00
Ashutosh Joshi
cb96331ac3 Adding new sensor types.
Adding new sensor types for the following -
     i) Stationay Detection
    ii) Motion Detection
   iii) Heart Beat Detection

Change-Id: I0e0dca011de99ed1dda56cbb3b6381df529a1345
2016-01-26 05:56:42 -08:00
Ashutosh Joshi
ed021eae5c Adding support for a 6 DOF pose sensor
Adding a six degree of freedom sensor returning device pose.

This pose is comprised of two parts a rotation from an orientaion
pointing due north and zero pitch and roll && a translation from
an initial point of reference.

Change-Id: If9e1d5a421b81e6e388c446a5a1c19e9c08ad067
2016-01-25 14:22:29 -08:00
Trevor Bunker
f8e7ed34bd sensor HAL: add device orientation sensor
This sensor reports the current device orientation (e.g., portrait vs.
landscape).

Bug: 23470411
Change-Id: I7654473d5aaee256b8ae906c40634141a7f9cdd8
2016-01-08 10:22:23 -08:00
Aravind Akella
2d6c8d7e90 Fix DATA_INJECTION flag in sensors.h
Bug: 24001171
Change-Id: Ia42934a97566f0ebe8d324e065351a3d9ed55621
2015-09-11 11:34:17 -07:00
Aravind Akella
c7f54134ca Define a flag for whether a sensor supports data_injection mode or not.
Change-Id: I46373bbd2e10859b84428fe32b76679ac4292607
2015-06-22 18:26:54 -07:00
Ashutosh Joshi
050f2e45a0 Remove custome sensors from sensors.h
Custom sensors should not be included in sensors.h

Change-Id: I553fbe3dd41eaaa70628184f5a0b9499699f17bc
2015-04-15 14:47:43 -07:00
Ashutosh Joshi
6507f5080b Sensors HAL changes
Adding HAL changes for the following
i) a method to place the HAL in a special mode.
     Expect to use this method for data-injection.
ii) a method to inject sensor data into the sensors subsystem.
iii) New sensor type for a SYNC event (google custom sensor).
iv)  New sensor type for a nudge gesture (google custom sensor).

Change-Id: Idf0479b6301c5363cf51938e23aabc790b69fa96
2015-04-14 15:11:49 -07:00
Nick Vaccaro
adbfbb747d Add new SENSOR_TYPE_WRIST_TILT_GESTURE sensor type
Adds a new sensor type for converting the Android Wear defined wrist
tilt sensor type into an official android sensor type.

Change-Id: If6357aeb463a556a68a19b28931edec04f99a952
2015-02-05 12:26:35 -08:00
Aravind Akella
110d2f2713 sensors.h documentation change.
i) on-change sensors should set maxDelay.
  ii) Drivers should hold a wake_lock till poll() is called
  the next time when delivering events from wake-up sensors.

Change-Id: I4b137843d5c857f04601618548306a710fbfbe5c
2014-09-05 14:50:07 -07:00
Griff Hazen
f0f67e6af9 Merge commit '38014a7c' into lmp-dev
Conflicts:
	include/hardware/sensors.h

Change-Id: I21517f717761af7f52c003d535e86059ebb75f05
2014-08-28 17:02:50 -07:00
Vinod Krishnan
74279e3c23 Adding information about the first activation
Change-Id: If5759749c5e6a88dcaf5ab600c9086b056c3908a
2014-08-28 15:25:13 -07:00
Aravind Akella
a7f2cda848 Sensor HAL documentation fix.
Change-Id: Ibc3f643a22163f734ba0ca912f011decf55d9bfa
2014-08-21 16:31:14 -07:00
Etienne Le Grand
772d85ad35 Some parameter renaming and comment update in sensors.h
bug: 16818625
Change-Id: Ifcda8cd4e80a7377a6b5b138b9c7a5a2275af153
2014-08-19 17:29:10 -07:00
Aravind Akella
9057e128b0 Remove WAKE_UP_* sensor constants and stringTypes.
Change-Id: Iabe4bb064d88d9fcecc1a31e609cb8b77ebdd5ad
2014-07-30 16:27:36 -07:00
destradaa
5ebb31c9bc Fix typo in sensor type using an already defined constant.
Change-Id: I209d9191456dc6c1ef2eb695c9a8348a18504a8d
2014-07-21 15:12:21 -07:00
Jeff Brown
8df2feb00d Add glance gesture for doze mode.
Change-Id: I2daa13e74d2183247c314c15ee283b7a6c20bc22
2014-07-17 18:20:12 -07:00
Aravind Akella
952471eb99 Define SENSOR_TYPE_PICK_UP_GESTURE.
Change-Id: I122f37f5625a2acc3912ad37bdf8717ae2f31b6f
2014-07-17 12:55:43 -07:00
Aravind Akella
c841efdc36 Add sensor flags for reportingMode.
Change-Id: Ife456dd13264bafa7cd50d72b8818526030d7a3e
2014-06-12 14:49:09 -07:00
Etienne Le Grand
426f14df08 Rewording of tilt sensor
Change-Id: I7bb0e63c3e1e6850359d7e690bfeea9e8c8fbcbf
2014-05-29 19:35:48 -07:00
Etienne Le Grand
53017efa7b Update starting gravity of tilt definition
Change-Id: I9be79fe264b8a751757a2b6840b7ff928679028d
2014-05-28 15:42:48 -07:00
Etienne Le Grand
7b7b4cb433 am ec9236ef: am ef2c616c: Merge "Update definition of the heart rate monitor to include confidence" into klp-modular-dev
* commit 'ec9236ef18e13b40a1b28aa05b4d5f483cc6ab74':
  Update definition of the heart rate monitor to include confidence
2014-05-27 18:14:50 +00:00
Etienne Le Grand
7b36158da7 Update definition of the heart rate monitor to include confidence
Change-Id: I88a8cddf647f77588a283c16d37f3f99ecda3115
2014-05-23 13:07:08 -07:00
Etienne Le Grand
ba12312fe1 Add SENSOR_TYPE_WAKE_GESTURE in the sensor hal.
Change-Id: Ia84dfe487bfdea227d5ae856f7e44b021dac1f19
2014-05-06 12:24:28 -07:00
Aravind Akella
f895c6824f Define TILT sensor
Change-Id: Ic3c223488aa4a0d66b07ae3065e59f8e2fe69ceb
2014-05-05 15:45:07 -07:00
Aravind Akella
6242f32a22 Define new wake_up sensors in sensors.h
i) Define WAKE_UP sensors.
     ii) Deprecate flags DRY_RUN and WAKE_UPON_FIFO_FULL.
    iii) Define maxDelay and isWakeUpSensor flag in sensor_t.

Bug: 13251067
Change-Id: Ic474d90d05459b06e93094856423f6645b4bf58e
2014-04-23 16:09:24 -07:00
Aravind Akella
477fbd5c7d Add heart rate monitor, stringType and requiredPermissions to sensors.h
Merged and resolved conflicts with Ic66b792c8229867fa5ff760cdde3d7c6f3360296

Conflicts:
	include/hardware/sensors.h

Change-Id: I47b7e5f16b50fd5272590f6daba4a9d6833b3afb
2014-04-10 16:57:42 -07:00
Aravind Akella
b20f1a3eaf DO NOT MERGE Add heart rate monitor, stringType and requiredPermissions to sensors.h
This reverts commit d27d819897.

Change-Id: Ic66b792c8229867fa5ff760cdde3d7c6f3360296
2014-04-08 18:55:50 +00:00
Etienne Le Grand
d27d819897 Revert "Add heart rate monitor, stringType and requiredPermissions to sensors.h"
This reverts commit 0b8ec4f71f.

Change-Id: I99051b6941cad570aef45ff568d1777f881fc33b
2014-04-05 05:01:27 +00:00
Etienne Le Grand
5bd1cb79bb Revert "Fix Merge conflict (Add heart rate monitor ...to sensors.h)"
This reverts commit c6854530e1.

Change-Id: Idc821b6645be6bfd9878cfc777010a123f013f0a
2014-04-05 04:48:21 +00:00
JP Abgrall
c6854530e1 Fix Merge conflict (Add heart rate monitor ...to sensors.h)
Change-Id: I376e4dbb13d64f4987d4a8be82afddb625eefa54

Conflicts:
	include/hardware/sensors.h
2014-04-04 20:51:05 -07:00
Etienne Le Grand
0b8ec4f71f Add heart rate monitor, stringType and requiredPermissions to sensors.h
Change-Id: I376e4dbb13d64f4987d4a8be82afddb625eefa54
2014-04-03 12:50:11 -07:00
Clay Murphy
8db1fb408c Docs: Removing contents now on source.android.com
Bug: 10134622

Change-Id: Ief5a53f1b5e5eff9ade45763d895029428266980
2013-12-19 16:05:18 -08:00
Mathias Agopian
1599ec6755 Define a range for device specific sensors
Bug: 9551417
Change-Id: I5412d9c063743a0e99e8839a0758337c72a8725e
2013-08-19 14:41:12 -07:00
Mathias Agopian
af32a8d594 minor changes to sensor HAL interface
Change-Id: Idc415fd0a92482f4f4cd051b458a28d97f251f35
2013-08-06 20:33:38 -07:00
Mathias Agopian
16671c5519 improvements to the batch mode APIs
- also added a flush() method to drain the FIFO before
  the batch timeout has expired

Change-Id: I73cc450fae0a6acf73d8b5d73bcd7a225bfbfe35
2013-08-05 17:07:02 -07:00
Etienne Le Grand
f770b7a9b9 Clarify some comments in the sensor HAL
Step count can reset when android restarts
When calling activate() without calling setDelay() before, use a default rate
Uncalibrated magnetometer should not be low pass filtered
The accelerometer can be used for the geomagnetic rotation vector
When batching call retuns an error, it shouldn't change the state. In particular, it shouldn't change the rate.
batch(timeout=0) must always return success
Wake upon fifo full will never be specified when timeout=0
setDelay is not called when in batch mode

Change-Id: I8a437eeedbdc54e5f1f3e644a92e9f781d7add0d
2013-07-10 14:44:27 -07:00
Mathias Agopian
27e16688ec be more explicit about 64 bits values in sensor events
Change-Id: I61e4832ff2c721987c38897924b1b50b758384da
2013-07-08 15:30:54 -07:00
Etienne Le Grand
7a813e8442 Modify sign of bias in uncalibrated magnetometer
bug 8632692
Change-Id: If92f0030e53d41a7d0bc3c3b003f5eb939123945
2013-04-23 14:32:22 -07:00
Etienne Le Grand
28f04113f5 Sensor HAL updates
Improve explanation of Batch mode
Put the 4th component of the unit quaternion back in the rotation vector
Modify rotation vector description
Modify definition of uncalibrated sensor event
Remove query()

Change-Id: I7564073fac0e2467bcfca040b259d9d20e2688c5
2013-04-04 15:14:58 -07:00
Etienne Le Grand
2e7d3cd8a8 Minor fix in significant motion description
Change-Id: I155181e43750948a6fd6fc246a4e0203cea7c9cb
2013-03-07 12:22:32 -08:00
Etienne Le Grand
1461f28f50 Add significant motion description
Change-Id: I56de3f2c12243b3d25cd825b66f7685e674533ff
2013-03-06 17:14:58 -08:00
Etienne Le Grand
ca8581433b Sensors HAL iterative update for jb-mr2
Specified more precisely what the uncalibrated magnetometer should be
Added uncalibrated sensors event struct
Specified that rotation vector and game rotation vector have to use gyroscopes
Added magnetic field rotation vector
Added accuracy field to rotation vector and magnetometer rotation vector
Added section on comparative importance of batching different sensors
Specified that one-shot sensors must deactivate themselves before sending an event.

Change-Id: Ibc30ce6fc30e698af49a91930bd5a8316b6568b9
2013-03-04 14:59:27 -08:00