Home | History | Annotate | Download | only in sensorhal

Lines Matching refs:sensor

176     // enable hall sensor for folio
321 sensors_event_t *HubConnection::initEv(sensors_event_t *ev, uint64_t timestamp, uint32_t type, uint32_t sensor)
327 ev->sensor = sensor;
332 void HubConnection::processSample(uint64_t timestamp, uint32_t type, uint32_t sensor, struct OneAxisSample *sample, __attribute__((unused)) bool highAccuracy)
337 switch (sensor) {
346 initEv(&nev[cnt++], timestamp, type, sensor)->pressure = sample->fdata;
349 initEv(&nev[cnt++], timestamp, type, sensor)->temperature = sample->fdata;
352 initEv(&nev[cnt++], timestamp, type, sensor)->distance = sample->fdata;
355 initEv(&nev[cnt++], timestamp, type, sensor)->light = sample->fdata;
361 initEv(&nev[cnt++], timestamp, type, sensor)->u64.step_counter = mLastStepCount;
367 initEv(&nev[cnt++], timestamp, type, sensor)->data[0] = 1.0f;
371 initEv(&nev[cnt++], timestamp, type, sensor)->data[0] = sample->idata;
379 initEv(&nev[cnt++], timestamp, type, sensor)->data[0] = sample->idata;
404 void HubConnection::processSample(uint64_t timestamp, uint32_t type, uint32_t sensor, struct RawThreeAxisSample *sample, __attribute__((unused)) bool highAccuracy)
410 switch (sensor) {
412 sv = &initEv(&nev[cnt++], timestamp, type, sensor)->acceleration;
426 void HubConnection::processSample(uint64_t timestamp, uint32_t type, uint32_t sensor, struct ThreeAxisSample *sample, bool highAccuracy)
436 switch (sensor) {
438 sv = &initEv(&nev[cnt++], timestamp, type, sensor)->acceleration;
445 if (mSensorState[sensor].enable) {
446 sv = &initEv(&nev[cnt++], timestamp, type, sensor)->gyro;
473 if (mSensorState[sensor].enable) {
474 sv = &initEv(&nev[cnt++], timestamp, type, sensor)->magnetic;
504 sv = &initEv(&nev[cnt++], timestamp, type, sensor)->orientation;
511 ev = initEv(&nev[cnt++], timestamp, type, sensor);
517 ev = initEv(&nev[cnt++], timestamp, type, sensor);
531 ev = initEv(&nev[cnt++], timestamp, type, sensor);
588 ALOGI("restoring: sensor=%d, handle=%d, enable=%d, period=%" PRId64 ", latency=%" PRId64,
594 ALOGE("failed to send config command to restore sensor %d\n", cmd.sensorType);
602 ALOGE("failed to send flush command to sensor %d\n", cmd.sensorType);
639 uint32_t type, sensor, bias, currSensor;
656 sensor = COMMS_SENSOR_ACCEL;
661 sensor = COMMS_SENSOR_ACCEL;
666 sensor = COMMS_SENSOR_GYRO;
672 sensor = COMMS_SENSOR_MAG;
678 sensor = COMMS_SENSOR_LIGHT;
683 sensor = COMMS_SENSOR_PROXIMITY;
688 sensor = COMMS_SENSOR_PRESSURE;
693 sensor = COMMS_SENSOR_TEMPERATURE;
698 sensor = COMMS_SENSOR_ORIENTATION;
703 sensor = COMMS_SENSOR_WINDOW_ORIENTATION;
708 sensor = COMMS_SENSOR_STEP_DETECTOR;
713 sensor = COMMS_SENSOR_STEP_COUNTER;
718 sensor = COMMS_SENSOR_SIGNIFICANT_MOTION;
723 sensor = COMMS_SENSOR_GRAVITY;
728 sensor = COMMS_SENSOR_LINEAR_ACCEL;
733 sensor = COMMS_SENSOR_ROTATION_VECTOR;
738 sensor = COMMS_SENSOR_GEO_MAG;
743 sensor = COMMS_SENSOR_GAME_ROTATION_VECTOR;
748 sensor = COMMS_SENSOR_HALL;
753 sensor = COMMS_SENSOR_SYNC;
758 sensor = COMMS_SENSOR_ACTIVITY;
763 sensor = COMMS_SENSOR_TILT;
768 sensor = COMMS_SENSOR_GESTURE;
773 sensor = COMMS_SENSOR_DOUBLE_TWIST;
778 sensor = COMMS_SENSOR_DOUBLE_TAP;
800 currSensor = sensor;
824 if (sensor == COMMS_SENSOR_ACTIVITY) {
835 ev.sensor = 0;
837 if (mSensorState[sensor].alt && mSensorState[mSensorState[sensor].alt].flushCnt > 0) {
838 mSensorState[mSensorState[sensor].alt].flushCnt --;
839 ev.meta_data.sensor = mSensorState[sensor].alt;
841 mSensorState[sensor].flushCnt --;
842 ev.meta_data.sensor = sensor;
846 ALOGI("flushing %d", ev.meta_data.sensor);
995 ALOGI("queueActivate: sensor=%d, handle=%d, enable=%d",
998 ALOGE("queueActivate: failed to send command: sensor=%d, handle=%d, enable=%d",
1023 ALOGI("queueSetDelay: sensor=%d, handle=%d, period=%" PRId64,
1026 ALOGE("queueSetDelay: failed to send command: sensor=%d, handle=%d, period=%" PRId64,
1056 ALOGI("queueBatch: sensor=%d, handle=%d, period=%" PRId64 ", latency=%" PRId64,
1059 ALOGE("queueBatch: failed to send command: sensor=%d, handle=%d, period=%" PRId64 ", latency=%" PRId64,
1082 ALOGI("queueFlush: sensor=%d, handle=%d",
1085 ALOGE("queueFlush: failed to send command: sensor=%d, handle=%d",
1104 ALOGI("queueData: sensor=%d, length=%zu",
1107 ALOGE("queueData: failed to send command: sensor=%d, length=%zu",