Home | History | Annotate | Download | only in android

Lines Matching defs:Sensor

35 /* this code supports emulated sensor hardware
75 /* For common Sensor Value struct */
116 } Sensor;
126 * - the HAL module sends "set:<sensor>:<flag>" to enable or disable
127 * the report of a given sensor state. <sensor> must be the name of
128 * a given sensor (e.g. "accelerometer"), and <flag> must be either
131 * - Once at least one sensor is "enabled", this code should periodically
137 * a new interval between sensor events sent by this code to the HAL
145 * - each timer tick, this code sends sensor reports in the following
155 * appear if the corresponding sensor has been enabled by the HAL module.
169 Sensor sensors[MAX_SENSORS];
279 /* this function is called periodically to send sensor reports
290 Sensor* sensor;
294 sensor = &hw->sensors[ANDROID_SENSOR_ACCELERATION];
296 sensor->u.acceleration.x,
297 sensor->u.acceleration.y,
298 sensor->u.acceleration.z);
303 sensor = &hw->sensors[ANDROID_SENSOR_MAGNETIC_FIELD];
305 sensor->u.magnetic.x,
306 sensor->u.magnetic.y,
307 sensor->u.magnetic.z);
312 sensor = &hw->sensors[ANDROID_SENSOR_ORIENTATION];
314 sensor->u.orientation.azimuth,
315 sensor->u.orientation.pitch,
316 sensor->u.orientation.roll);
321 sensor = &hw->sensors[ANDROID_SENSOR_TEMPERATURE];
323 sensor->u.temperature.celsius);
328 sensor = &hw->sensors[ANDROID_SENSOR_PROXIMITY];
330 sensor->u.proximity.value);
388 * between sensor events
399 * sensor. <state> must be 0 or 1
414 D("%s: ignore unknown sensor name '%s'", __FUNCTION__, msg);
419 D("%s: trying to set disabled %s sensor", __FUNCTION__, msg);
430 D("%s: %s %s sensor", __FUNCTION__,
440 /* Saves sensor-specific client data to snapshot */
451 /* Loads sensor-specific client data from snapshot */
483 /* change the value of the emulated sensor vector */
487 Sensor* s = &h->sensors[sensor_id];
505 Sensor* s = &h->sensors[i];
508 /* this switch ensures that a warning is raised when a new sensor is
553 /* load sensor state */
556 Sensor* s = &h->sensors[i];
559 /* this switch ensures that a warning is raised when a new sensor is
605 Sensor* s = &h->sensors[ANDROID_SENSOR_PROXIMITY];
614 * the accelerometer sensor (*not* the orientation sensor !)
685 /* Get sensor name from sensor id */
695 /* Get sensor id from sensor name */
731 Sensor* sensor = &hw->sensors[sensor_id];
733 if (! sensor->enabled)
738 *a = sensor->u.value.a;
739 *b = sensor->u.value.b;
740 *c = sensor->u.value.c;
765 /* Get Sensor from sensor id */