Lines Matching refs:sensor

101 static bool isWakeEvent(int32_t sensor)  in isWakeEvent()  argument
103 switch (sensor) { in isWakeEvent()
554 …t_t *HubConnection::initEv(sensors_event_t *ev, uint64_t timestamp, uint32_t type, uint32_t sensor) in initEv() argument
560 ev->sensor = sensor; in initEv()
565 ssize_t HubConnection::decrementIfWakeEventLocked(int32_t sensor) in decrementIfWakeEventLocked() argument
567 if (isWakeEvent(sensor)) { in decrementIfWakeEventLocked()
572 __FUNCTION__, sensor, mWakeEventCount); in decrementIfWakeEventLocked()
578 void HubConnection::protectIfWakeEventLocked(int32_t sensor) in protectIfWakeEventLocked() argument
580 if (isWakeEvent(sensor)) { in protectIfWakeEventLocked()
599 void HubConnection::processSample(uint64_t timestamp, uint32_t type, uint32_t sensor, struct OneAxi… in processSample() argument
604 switch (sensor) { in processSample()
606 initEv(&nev[cnt++], timestamp, type, sensor)->pressure = sample->fdata; in processSample()
609 initEv(&nev[cnt++], timestamp, type, sensor)->relative_humidity = sample->fdata; in processSample()
612 initEv(&nev[cnt++], timestamp, type, sensor)->temperature = sample->fdata; in processSample()
615 initEv(&nev[cnt++], timestamp, type, sensor)->temperature = sample->fdata; in processSample()
618 initEv(&nev[cnt++], timestamp, type, sensor)->distance = sample->fdata; in processSample()
621 initEv(&nev[cnt++], timestamp, type, sensor)->light = sample->fdata; in processSample()
627 initEv(&nev[cnt++], timestamp, type, sensor)->u64.step_counter = mLastStepCount; in processSample()
634 initEv(&nev[cnt++], timestamp, type, sensor)->data[0] = 1.0f; in processSample()
641 initEv(&nev[cnt++], timestamp, type, sensor)->data[0] = sample->idata; in processSample()
649 initEv(&nev[cnt++], timestamp, type, sensor)->data[0] = sample->idata; in processSample()
676 void HubConnection::processSample(uint64_t timestamp, uint32_t type, uint32_t sensor, struct RawThr… in processSample() argument
683 switch (sensor) { in processSample()
685 sv = &initEv(&nev[cnt], timestamp, type, sensor)->acceleration; in processSample()
692 if (mSensorState[sensor].enable && isSampleIntervalSatisfied(sensor, timestamp)) { in processSample()
748 sv = &initEv(&nev[cnt], timestamp, type, sensor)->magnetic; in processSample()
755 if (mSensorState[sensor].enable && isSampleIntervalSatisfied(sensor, timestamp)) { in processSample()
783 void HubConnection::processSample(uint64_t timestamp, uint32_t type, uint32_t sensor, struct ThreeA… in processSample() argument
793 switch (sensor) { in processSample()
795 sv = &initEv(&nev[cnt], timestamp, type, sensor)->acceleration; in processSample()
802 if (mSensorState[sensor].enable && isSampleIntervalSatisfied(sensor, timestamp)) { in processSample()
835 sv = &initEv(&nev[cnt], timestamp, type, sensor)->gyro; in processSample()
842 if (mSensorState[sensor].enable && isSampleIntervalSatisfied(sensor, timestamp)) { in processSample()
887 sv = &initEv(&nev[cnt], timestamp, type, sensor)->magnetic; in processSample()
894 if (mSensorState[sensor].enable && isSampleIntervalSatisfied(sensor, timestamp)) { in processSample()
925 sv = &initEv(&nev[cnt++], timestamp, type, sensor)->orientation; in processSample()
932 ev = initEv(&nev[cnt++], timestamp, type, sensor); in processSample()
938 ev = initEv(&nev[cnt++], timestamp, type, sensor); in processSample()
952 ev = initEv(&nev[cnt++], timestamp, type, sensor); in processSample()
1091 uint32_t type, sensor, bias, currSensor; in processBuf() local
1112 sensor = COMMS_SENSOR_ACCEL; in processBuf()
1118 sensor = COMMS_SENSOR_ACCEL; in processBuf()
1123 sensor = COMMS_SENSOR_GYRO; in processBuf()
1129 sensor = COMMS_SENSOR_MAG; in processBuf()
1135 sensor = COMMS_SENSOR_MAG; in processBuf()
1140 sensor = COMMS_SENSOR_LIGHT; in processBuf()
1145 sensor = COMMS_SENSOR_PROXIMITY; in processBuf()
1150 sensor = COMMS_SENSOR_PRESSURE; in processBuf()
1155 sensor = COMMS_SENSOR_HUMIDITY; in processBuf()
1162 sensor = COMMS_SENSOR_TEMPERATURE; in processBuf()
1167 sensor = COMMS_SENSOR_AMBIENT_TEMPERATURE; in processBuf()
1172 sensor = COMMS_SENSOR_ORIENTATION; in processBuf()
1177 sensor = COMMS_SENSOR_WINDOW_ORIENTATION; in processBuf()
1182 sensor = COMMS_SENSOR_STEP_DETECTOR; in processBuf()
1187 sensor = COMMS_SENSOR_STEP_COUNTER; in processBuf()
1192 sensor = COMMS_SENSOR_SIGNIFICANT_MOTION; in processBuf()
1197 sensor = COMMS_SENSOR_GRAVITY; in processBuf()
1202 sensor = COMMS_SENSOR_LINEAR_ACCEL; in processBuf()
1207 sensor = COMMS_SENSOR_ROTATION_VECTOR; in processBuf()
1212 sensor = COMMS_SENSOR_GEO_MAG; in processBuf()
1217 sensor = COMMS_SENSOR_GAME_ROTATION_VECTOR; in processBuf()
1222 sensor = COMMS_SENSOR_HALL; in processBuf()
1227 sensor = COMMS_SENSOR_SYNC; in processBuf()
1232 sensor = COMMS_SENSOR_TILT; in processBuf()
1237 sensor = COMMS_SENSOR_GESTURE; in processBuf()
1242 sensor = COMMS_SENSOR_DOUBLE_TWIST; in processBuf()
1247 sensor = COMMS_SENSOR_DOUBLE_TAP; in processBuf()
1252 sensor = COMMS_SENSOR_WRIST_TILT; in processBuf()
1257 sensor = COMMS_SENSOR_DOUBLE_TOUCH; in processBuf()
1262 sensor = COMMS_SENSOR_GAZE; in processBuf()
1267 sensor = COMMS_SENSOR_UNGAZE; in processBuf()
1293 currSensor = sensor; in processBuf()
1333 primary = mSensorState[sensor].primary; in processBuf()
1334 primary = (primary ? primary : sensor); in processBuf()
1346 ev.sensor = 0; in processBuf()
1348 ev.meta_data.sensor = flush.handle; in processBuf()
1365 ALOGV("flushing %d", ev.meta_data.sensor); in processBuf()
1368 ALOGW("too little data for sensor %d: len=%zu\n", sensor, len); in processBuf()
1822 decrementIfWakeEventLocked(ev[i].sensor); in read()
1837 protectIfWakeEventLocked(ev[i].sensor); in write()
1960 auto i = mSensorToChannel.find(nev->sensor); in sendDirectReportEvent()
1967 nev->sensor, j.second.rateLevel))) { in sendDirectReportEvent()