/hardware/akm/AK8975_FS/libsensors/ |
AkmSensor.cpp | 47 mPendingEvents[Accelerometer].sensor = ID_A; 52 mPendingEvents[MagneticField].sensor = ID_M; 57 mPendingEvents[Orientation ].sensor = ID_O;
|
sensors.cpp | 41 #error "Sensor configuration ERROR: No sensor is defined." 65 { "AK8975 3-axis Magnetic field sensor", 77 { "AK8975 Orientation sensor", 89 { "AK8975 Orientation sensor", 118 .name = "AKM Sensor module", 152 * which sensor is implemented in AKMD program. 285 SensorBase* const sensor(mSensors[i]); 286 if ((mPollFds[i].revents & POLLIN) || (sensor->hasPendingEvents())) { 287 int nb = sensor->readEvents(data, count) [all...] |
AdxlSensor.cpp | 44 mPendingEvent.sensor = ID_A;
|
/hardware/libhardware/include/hardware/ |
sensors.h | 42 * introduction to and detailed descriptions of Android sensor types: 91 * See sensor types for more details on what sensors should require this 98 * Sensor HAL modes used in set_operation_mode method 113 * physical sensors as it would in normal mode. Instead sensor data is 114 * injected by the sensor service. 123 * Mask and shift for reporting mode sensor flags defined above. 131 * Mask and shift for data_injection mode sensor flags defined above. 137 * Mask and shift for dynamic sensor flag. 143 * Mask and shift for sensor additional information support. 150 * Sensor flags used in sensor_t.flags 939 int32_t sensor; member in struct:meta_data_event 949 const struct sensor_t * sensor; \/\/ should be NULL if connected == false member in struct:dynamic_sensor_meta_event 1058 int32_t sensor; member in struct:sensors_event_t [all...] |
/packages/services/Car/service/src/com/android/car/hal/ |
SensorHalService.java | 38 * Sensor HAL implementation for physical sensors in car. 67 int sensor = getSensorTypeFromHalProperty(halProperty.getProp()); local 68 if (sensor != SENSOR_TYPE_INVALD && 75 mSensorToHalProperty.append(sensor, halProperty); 111 throw new RuntimeException("handleBooleanHalEvent no sensor defined for property " + 235 * Covert hal property to sensor type. This is also used to check if specific property 236 * is supported by sensor hal or not. 261 writer.println("*Sensor HAL*");
|
/hardware/invensense/6515/libsensors_iio/software/core/mllite/ |
data_builder.c | 57 void inv_apply_calibration(struct inv_single_sensor_t *sensor, const long *bias); 201 /** Sets orientation and sensitivity field for a sensor. 202 * @param[out] sensor Structure to apply settings to 207 void set_sensor_orientation_and_scale(struct inv_single_sensor_t *sensor, 218 sensor->sensitivity = sensitivity; 233 sensor->orientation = orientation; 330 /** Returns timestame based upon a raw sensor, and returns if that sample has a new piece of data. 367 /** Gets best timestamp and if there is a new piece of data for a 9-axis sensor combination. 368 * It does this by finding a raw sensor that has the closest sample rate that is at least as 369 * often desired. It also returns if that raw sensor has a new piece of data [all...] |
/hardware/invensense/65xx/libsensors_iio/software/core/mllite/ |
data_builder.c | 56 void inv_apply_calibration(struct inv_single_sensor_t *sensor, const long *bias); 200 /** Sets orientation and sensitivity field for a sensor. 201 * @param[out] sensor Structure to apply settings to 206 void set_sensor_orientation_and_scale(struct inv_single_sensor_t *sensor, 217 sensor->sensitivity = sensitivity; 232 sensor->orientation = orientation; 480 /** Takes raw data stored in the sensor, removes bias, and converts it to 482 * @param[in,out] sensor structure to modify 486 void inv_apply_calibration(struct inv_single_sensor_t *sensor, const long *bias) 491 raw32[0] = (long)sensor->raw[0] << 15 [all...] |
/cts/apps/CtsVerifier/src/com/android/cts/verifier/sensors/helpers/ |
PowerTestHostLink.java | 22 import android.hardware.Sensor; 203 final String REQUEST_SENSOR_ON = "SENSOR ON "; 204 final String REQUEST_SENSOR_OFF = "SENSOR OFF"; 205 final String REQUEST_SENSOR_AVAILABILITY = "SENSOR? "; 212 final String sensor = request.substring(REQUEST_SENSOR_AVAILABILITY.length()); local 213 final int sensorId = getSensorId(sensor); 331 Log.e(TAG, "Unknown sensor in request: " + sensorName); 337 Log.e(TAG, "Improperly formatted command received on setting sensor state"); 347 sensorId = Sensor.TYPE_ACCELEROMETER; 349 sensorId = Sensor.TYPE_AMBIENT_TEMPERATURE [all...] |
/cts/tests/tests/hardware/src/android/hardware/cts/ |
SingleSensorTests.java | 20 import android.hardware.Sensor; 41 * For each sensor that reports continuously, it takes a set of samples. The test suite verifies 42 * that the event ordering, frequency, and jitter pass for the collected sensor events. It 43 * additionally tests that the mean, standard deviation, and magnitude are correct for the sensor 46 * The event ordering test verifies the ordering of the sampled data reported by the Sensor under 47 * test. This test is used to guarantee that sensor data is reported in the order it occurs, and 51 * if the sensor sampled data is not timestamped at the hardware level. Or events sampled at high 54 * The frequency test verifies that the sensor under test can sample and report data at the maximum 57 * susceptible to errors if the sensor is not capable to sample data at the maximum rate it 58 * supports, or the sensor events are not timestamped at the hardware level 124 Sensor sensor = sensorManager.getDefaultSensor(entry.getKey()); local [all...] |
/cts/apps/CameraITS/pymodules/its/ |
device.py | 296 """Start collecting sensor events on the device. 311 """Get a trace of all sensor events on the device. 323 Note that sensor events are only produced if the device isn't in its 478 frame ("yuv") corresponding to a full sensor frame. 502 "android.sensor.exposureTime": 100*1000*1000, 503 "android.sensor.sensitivity": 100 510 "android.sensor.exposureTime": 100*1000*1000, 511 "android.sensor.sensitivity": 100 514 "android.sensor.exposureTime": 100*1000*1000, 515 "android.sensor.sensitivity": 20 [all...] |
/frameworks/base/packages/SystemUI/src/com/android/systemui/doze/ |
DozeService.java | 27 import android.hardware.Sensor; 133 mSigMotionSensor = new TriggerSensor(Sensor.TYPE_SIGNIFICANT_MOTION, 136 mPickupSensor = new TriggerSensor(Sensor.TYPE_PICK_UP_GESTURE, 421 .append(event.sensor.getName()); 486 private final Sensor mSensor; 553 updateListener(); // reregister, this sensor only fires once 566 if (mSensor.getType() == Sensor.TYPE_PICK_UP_GESTURE) { 592 final Sensor sensor = mSensors.getDefaultSensor(Sensor.TYPE_PROXIMITY) [all...] |
/cts/apps/CtsVerifier/src/com/android/cts/verifier/sensors/ |
SignificantMotionTestActivity.java | 34 import android.hardware.Sensor; 51 * Test cases for Significant Motion sensor. 80 private Sensor mSensorSignificantMotion; 273 mSensorSignificantMotion = mSensorManager.getDefaultSensor(Sensor.TYPE_SIGNIFICANT_MOTION); 275 throw new SensorNotSupportedException(Sensor.TYPE_SIGNIFICANT_MOTION); 349 int eventType = event.sensor.getType(); 352 Sensor.TYPE_SIGNIFICANT_MOTION, 354 Assert.assertEquals(eventTypeMessage, Sensor.TYPE_SIGNIFICANT_MOTION, eventType); 356 String sensorName = event.sensor.getName(); 374 + TestSensorEnvironment.getSensorMaxDetectionLatencyNs(event.sensor); [all...] |
HeartRateMonitorTestActivity.java | 21 import android.hardware.Sensor; 38 private Sensor mSensor; 54 mSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_HEART_RATE); 111 public void onAccuracyChanged(Sensor sensor, int i) {
|
/development/samples/ApiDemos/src/com/example/android/apis/graphics/ |
Compass.java | 21 import android.hardware.Sensor; 34 private Sensor mSensor; 48 public void onAccuracyChanged(Sensor sensor, int accuracy) { 56 mSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_ORIENTATION);
|
/device/google/contexthub/inc/ |
chre_sensor.h | 21 * API dealing with sensor interaction in the Context Hub Runtime 24 * This includes the definition of our sensor types and the ability to 39 * The CHRE_SENSOR_TYPE_* defines are the sensor types supported. 41 * Unless otherwise noted, each of these sensor types is based off of a 42 * corresponding sensor type in the Android API's sensors.h interface. 51 * Note that every sensor will generate CHRE_EVENT_SENSOR_SAMPLING_CHANGE 52 * events, so it is not listed with each individual sensor. 69 * This is a one-shot sensor. 82 * This is a one-shot sensor. 109 * Barometric pressure sensor [all...] |
/frameworks/base/core/java/android/view/ |
OrientationEventListener.java | 20 import android.hardware.Sensor; 38 private Sensor mSensor; 63 * @param rate at which sensor events are processed (see also 71 mSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); 83 * Enables the OrientationEventListener so it will monitor the sensor and call 139 mOldListener.onSensorChanged(Sensor.TYPE_ACCELEROMETER, event.values); 147 public void onAccuracyChanged(Sensor sensor, int accuracy) { 153 * Returns true if sensor is enabled and false otherwise
|
/frameworks/base/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/samples/simplecamera/ |
MotionSensorWTime.java | 17 // Make values from a motion sensor (e.g., accelerometer) available as filter outputs. 22 import android.hardware.Sensor; 39 private Sensor mSensor = null; 62 mSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_LINEAR_ACCELERATION); 63 // TODO: currently, the type of sensor is hardcoded. Should be able to set the sensor 74 public final void onAccuracyChanged(Sensor sensor, int accuracy) { 75 // (Do we need to do something when sensor accuracy changes?)
|
/frameworks/native/include/gui/ |
Sensor.h | 30 #include <android/sensor.h> 44 class Sensor : public ASensor, public LightFlattenable<Sensor> 64 Sensor(const char * name = ""); 65 Sensor(struct sensor_t const* hwSensor, int halVersion = 0); 66 Sensor(struct sensor_t const& hwSensor, const uuid_t& uuid, int halVersion = 0); 67 ~Sensor();
|
/packages/apps/Dialer/InCallUI/src/com/android/incallui/ |
AccelerometerListener.java | 20 import android.hardware.Sensor; 39 private Sensor mSensor; 44 // mPendingOrientation is the latest orientation computed based on the sensor value. 68 mSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); 121 // If some values are exactly zero, then likely the sensor is not powered up yet. 143 public void onAccuracyChanged(Sensor sensor, int accuracy) {
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/sensors/renderers/ |
GLArrowSensorTestRenderer.java | 24 import android.hardware.Sensor; 39 * Renders a wedge to indicate the direction of sensor data. 89 if (mSensorType == Sensor.TYPE_ACCELEROMETER) { 157 public void onAccuracyChanged(Sensor arg0, int arg1) { 166 int type = event.sensor.getType(); 167 if (event.sensor.getType() == Sensor.TYPE_ACCELEROMETER) { 183 } else if (type == Sensor.TYPE_ROTATION_VECTOR 184 || type == Sensor.TYPE_GEOMAGNETIC_ROTATION_VECTOR 185 || type == Sensor.TYPE_GAME_ROTATION_VECTOR) [all...] |
/cts/tests/tests/hardware/src/android/hardware/cts/helpers/ |
SensorCtsHelper.java | 18 import android.hardware.Sensor; 207 "%s | sensor='%s', samplingPeriod=%dus, maxReportLatency=%dus | %s", 216 * @return A {@link File} representing a root directory to store sensor tests data. 224 * Creates the directory structure for the given sensor test data sub-directory. 275 public static String getUnitsForSensor(Sensor sensor) { 276 switch(sensor.getType()) { 277 case Sensor.TYPE_ACCELEROMETER: 279 case Sensor.TYPE_MAGNETIC_FIELD: 280 case Sensor.TYPE_MAGNETIC_FIELD_UNCALIBRATED [all...] |
/development/samples/Compass/src/com/example/android/compass/ |
CompassActivity.java | 30 import android.hardware.Sensor; 77 Sensor gsensor = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); 78 Sensor msensor = mSensorManager.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD); 205 public void onAccuracyChanged(Sensor sensor, int accuracy) { 209 int type = event.sensor.getType(); 211 if (type == Sensor.TYPE_ACCELEROMETER) { 213 } else if (type == Sensor.TYPE_MAGNETIC_FIELD) [all...] |
/packages/apps/Gallery2/src/com/android/gallery3d/app/ |
EyePosition.java | 20 import android.hardware.Sensor; 65 private Sensor mSensor; 85 mSensor = sManager.getDefaultSensor(Sensor.TYPE_GYROSCOPE); 88 mSensor = sManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); 91 Log.w(TAG, "no sensor available"); 184 public void onAccuracyChanged(Sensor sensor, int accuracy) { 189 switch (event.sensor.getType()) { 190 case Sensor.TYPE_GYROSCOPE: { 195 case Sensor.TYPE_ACCELEROMETER: [all...] |
/hardware/libhardware/modules/sensors/ |
multihal.cpp | 61 * Comparable class that globally identifies a sensor, by module index and local handle. 63 * A local handle is the handle the sub-module assigns to a sensor. 107 // Returns the sub_hw_modules index of the module that contains the sensor associates with this 256 // Android L requires sensor HALs to be either 1_0 or 1_3 compliant 289 ALOGE("IGNORING activate(enable %d) call to non-API-compliant sensor handle=%d !", 304 ALOGE("IGNORING setDelay() call for non-API-compliant sensor handle=%d !", handle); 313 // A normal event's "sensor" field is a local handle. Convert it to a global handle. 314 // A meta-data event must have its sensor set to 0, but it has a nested event 319 // If it's a metadata event, rewrite the inner payload, not the sensor field. 320 // If the event's sensor field is unregistered for any reason, rewrite the sensor fiel [all...] |
/hardware/invensense/6515/libsensors_iio/ |
sensors_mpl.cpp | 148 /* TODO: Handle external pressure sensor */ 164 // populate the sensor list 235 flushCompleteEvent.sensor = 0; 237 flushCompleteEvent.meta_data.sensor = handle_element->handle; 242 flushCompleteEvent.meta_data.sensor); 292 /* Hold wakelock until Sensor Services reads event */ 451 /** Open a new instance of a sensor device using name */
|