OSDN Git Service

Sensors: MultiHal: Increase xfer buffer size
authorNick Vaccaro <nvaccaro@google.com>
Tue, 9 Feb 2016 22:56:17 +0000 (14:56 -0800)
committerNick Vaccaro <nvaccaro@google.com>
Tue, 9 Feb 2016 23:48:19 +0000 (15:48 -0800)
Increased the size of the sensor event transfer queue from 20 to
36 sensor events.  This size now matches Sensor Services buffer size
that it passes to poll() for reading events and will allow the
multihal to transfer the maximum events possible per poll cycle.

Change-Id: I55459ea0a70b9da848d3d3d43590050d71c53e28

modules/sensors/multihal.cpp

index d26d168..d1536f4 100644 (file)
@@ -129,7 +129,7 @@ static int get_global_handle(FullHandle* full_handle) {
     return global_handle;
 }
 
-static const int SENSOR_EVENT_QUEUE_CAPACITY = 20;
+static const int SENSOR_EVENT_QUEUE_CAPACITY = 36;
 
 struct TaskContext {
   sensors_poll_device_t* device;