summaryrefslogtreecommitdiff
path: root/sensors/1.0/default/Sensors.cpp
diff options
context:
space:
mode:
authorPeng Xu <pengxu@google.com>2017-01-11 11:08:45 -0800
committerPeng Xu <pengxu@google.com>2017-01-14 05:42:13 +0000
commit1f12c7a338884479cbc274094ca834bee1bb98ca (patch)
tree58c1361919280122ad23f749547c12af435b3bb6 /sensors/1.0/default/Sensors.cpp
parentef57875746b0ef912d145668ee0764a9cf2f28c0 (diff)
[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
Diffstat (limited to 'sensors/1.0/default/Sensors.cpp')
-rw-r--r--sensors/1.0/default/Sensors.cpp12
1 files changed, 1 insertions, 11 deletions
diff --git a/sensors/1.0/default/Sensors.cpp b/sensors/1.0/default/Sensors.cpp
index f9f1ca6ecf..8903397a2b 100644
--- a/sensors/1.0/default/Sensors.cpp
+++ b/sensors/1.0/default/Sensors.cpp
@@ -142,15 +142,6 @@ Return<Result> Sensors::activate(
enabled));
}
-Return<Result> Sensors::setDelay(
- int32_t sensor_handle, int64_t sampling_period_ns) {
- return ResultFromStatus(
- mSensorDevice->setDelay(
- reinterpret_cast<sensors_poll_device_t *>(mSensorDevice),
- sensor_handle,
- sampling_period_ns));
-}
-
Return<void> Sensors::poll(int32_t maxCount, poll_cb _hidl_cb) {
hidl_vec<Event> out;
hidl_vec<SensorInfo> dynamicSensorsAdded;
@@ -206,14 +197,13 @@ Return<void> Sensors::poll(int32_t maxCount, poll_cb _hidl_cb) {
Return<Result> Sensors::batch(
int32_t sensor_handle,
- int32_t flags,
int64_t sampling_period_ns,
int64_t max_report_latency_ns) {
return ResultFromStatus(
mSensorDevice->batch(
mSensorDevice,
sensor_handle,
- flags,
+ 0, /*flags*/
sampling_period_ns,
max_report_latency_ns));
}