aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClay Murphy <claym@google.com>2013-12-09 17:07:32 -0800
committerClay Murphy <claym@google.com>2013-12-09 17:48:37 -0800
commiteeb15ca949cad7709a80d60a68f4d5e0a3292dd3 (patch)
treec0529d14c370646b1bd0145bd388b22bdd99c952
parent29541f115c670962bb748645a91b4212b31b09ea (diff)
downloadsource.android.com-eeb15ca949cad7709a80d60a68f4d5e0a3292dd3.tar.gz
Docs: Adding information for temp and setDelay
Bug: 10134622 Change-Id: I5bb9ec9a386ed93407bb78fb14a536dfae878cd8
-rw-r--r--src/devices/sensors/composite_sensors.jd4
-rw-r--r--src/devices/sensors/index.jd11
2 files changed, 12 insertions, 3 deletions
diff --git a/src/devices/sensors/composite_sensors.jd b/src/devices/sensors/composite_sensors.jd
index 7ede9eeb..2c986729 100644
--- a/src/devices/sensors/composite_sensors.jd
+++ b/src/devices/sensors/composite_sensors.jd
@@ -30,6 +30,10 @@ page.title=Composite sensors
underlying base sensors, and trigger modes. Certain base sensors are required of
each sensor for accuracy. Using other tools to approximate results should be
avoided as they will invariably provide a poor user experience.</p>
+
+<p>When there is no gyroscope on the device, and
+only when there is no gyroscope, you may implement the rotation vector and
+other composite sensors without using the gyroscope.</p>
<table>
<tr>
<th>Sensor type</th>
diff --git a/src/devices/sensors/index.jd b/src/devices/sensors/index.jd
index 449cdbdf..b47dd3bc 100644
--- a/src/devices/sensors/index.jd
+++ b/src/devices/sensors/index.jd
@@ -218,9 +218,14 @@ href="{@docRoot}devices/sensors/batching.html">Batching</a> section for details.
<li>One-shot: setDelay() is ignored. It has no effect.</li>
<li>Special: See specific sensor type descriptions.</li>
</ul>
-<p>For continuous and on-change sensors, if the requested value is less than sensor_t::minDelay, then it's silently clamped to sensor_t::minDelay unless
- sensor_t::minDelay is 0, in which case it is clamped to &gt;= 1ms:<br/>
- @return 0 if successful, &lt; 0 on error</p>
+<p>For continuous and on-change sensors, if the requested value is less than sensor_t::minDelay,
+then it's silently clamped to sensor_t::minDelay unless sensor_t::minDelay is 0,
+in which case it is clamped to &gt;= 1ms. setDelay will not be called when the sensor is
+in batching mode. In this case, batch() will be called with the new period. Return 0 if successful,
+&lt; 0 on error.</p>
+<p>When calculating the sampling period T in setDelay (or batch), the actual period
+should be smaller than T and no smaller than T/2. Finer granularity is not
+necessary.</p>
<h4 id="flush">flush()</h4>
<pre>
int (*flush)(struct sensors_poll_device_1* dev, int handle);