Home | History | Annotate | Download | only in android

Lines Matching defs:Sensor

39 /* this code supports emulated sensor hardware
79 /* For common Sensor Value struct */
120 } Sensor;
130 * - the HAL module sends "set:<sensor>:<flag>" to enable or disable
131 * the report of a given sensor state. <sensor> must be the name of
132 * a given sensor (e.g. "accelerometer"), and <flag> must be either
135 * - Once at least one sensor is "enabled", this code should periodically
141 * a new interval between sensor events sent by this code to the HAL
149 * - each timer tick, this code sends sensor reports in the following
159 * appear if the corresponding sensor has been enabled by the HAL module.
173 Sensor sensors[MAX_SENSORS];
284 /* this function is called periodically to send sensor reports
295 Sensor* sensor;
299 sensor = &hw->sensors[ANDROID_SENSOR_ACCELERATION];
301 sensor->u.acceleration.x,
302 sensor->u.acceleration.y,
303 sensor->u.acceleration.z);
308 sensor = &hw->sensors[ANDROID_SENSOR_MAGNETIC_FIELD];
311 sensor->u.magnetic.x,
312 sensor->u.magnetic.y,
313 sensor->u.magnetic.z);
318 sensor = &hw->sensors[ANDROID_SENSOR_ORIENTATION];
320 sensor->u.orientation.azimuth,
321 sensor->u.orientation.pitch,
322 sensor->u.orientation.roll);
327 sensor = &hw->sensors[ANDROID_SENSOR_TEMPERATURE];
329 sensor->u.temperature.celsius);
334 sensor = &hw->sensors[ANDROID_SENSOR_PROXIMITY];
336 sensor->u.proximity.value);
394 * between sensor events
405 * sensor. <state> must be 0 or 1
420 D("%s: ignore unknown sensor name '%s'", __FUNCTION__, msg);
425 D("%s: trying to set disabled %s sensor", __FUNCTION__, msg);
436 D("%s: %s %s sensor", __FUNCTION__,
440 /* If emulating device is connected update sensor state there too. */
456 /* Saves sensor-specific client data to snapshot */
467 /* Loads sensor-specific client data from snapshot */
499 /* change the value of the emulated sensor vector */
503 Sensor* s = &h->sensors[sensor_id];
521 Sensor* s = &h->sensors[i];
524 /* this switch ensures that a warning is raised when a new sensor is
569 /* load sensor state */
572 Sensor* s = &h->sensors[i];
575 /* this switch ensures that a warning is raised when a new sensor is
621 Sensor* s = &h->sensors[ANDROID_SENSOR_PROXIMITY];
630 * the accelerometer sensor (*not* the orientation sensor !)
665 * sensor emulation. */
668 V("Realistic sensor emulation is not available, since the remote controller is not accessible:\n %s",
723 /* Get sensor name from sensor id */
733 /* Get sensor id from sensor name */
769 Sensor* sensor = &hw->sensors[sensor_id];
771 if (! sensor->enabled)
776 *a = sensor->u.value.a;
777 *b = sensor->u.value.b;
778 *c = sensor->u.value.c;
803 /* Get Sensor from sensor id */