Commit graph

7 commits

Author SHA1 Message Date
Andreas Huber
40d3a9bd8c Convert all comments into "doxygen-ready" comments.
Bug: 36453077
Test: mma
Change-Id: I0b1f77dfae5d2258969e33d85ecf45401ffbdfaa
2017-03-29 08:53:58 -07:00
Peng Xu
cefa91bb51 [sensors] Add parameter check to poll()
Check maxCount parameter so that it will not allocate overly large
amount of memory if input parameter is bad.

Bug: 32953589
Test: build and pass vts
Change-Id: Ia19e0315ab1623b8b6580889c1e058a19e6c9670
2017-01-18 13:26:37 -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
Peng Xu
e82ec56a75 [sensors] extend functionality of injectSensorData
Extend injectSensorData functionality to also take
SENSOR_TYPE_ADDITIONAL_INFO type for parameter download.

Defined new AINFO constants

    AINFO_LOCAL_GEOMAGNETIC_FIELD
    AINFO_LOCAL_GRAVITY
    AINFO_DOCK_STATE
    AINFO_HIGH_PERFORMANCE_MODE
    AINFO_MAGNETIC_FIELD_CALIBRATION

Test: manual

Change-Id: I642fa1048ad600cc87c029ec18e73b3411631032
2017-01-14 01:45:58 +00:00
Peng Xu
0873e641cf [sensors] Format, wording and naming changes
* replace all "should" description with more precise wording.
 * replace "aidl" name in parameter to avoid confusion.
 * reformat files and method description.

Test: m -j32
Change-Id: Id1129b816b3c364c76f0a24fabba1e1418dbd8db
2017-01-12 01:53:42 +00:00
Peng Xu
0f0df7ed0a [sensors] new functions and types for direct report mode
Added functions:

  * registerDirectChannel
  * unregisterDirectChannel
  * configDirectReport

Added structs and enums related to direct report functionality.

Stub default implementation is also included.

Test: compiles and runs
Bug: 30985702
Change-Id: Ia542673e2b180e0aa62c1374cf8c1671bf2f5721
2017-01-10 15:19:59 -08:00
Andreas Huber
db49a41180 sensor HAL v3
Bug: 32021636
Test: no
Change-Id: I7a4c5c47f8621209daef5af4d0dcbb806a236e41
2016-10-13 09:21:46 -07:00