Lines Matching refs:timestamp
554 sensors_event_t *HubConnection::initEv(sensors_event_t *ev, uint64_t timestamp, uint32_t type, uint… in initEv() argument
558 ev->timestamp = timestamp; in initEv()
599 void HubConnection::processSample(uint64_t timestamp, uint32_t type, uint32_t sensor, struct OneAxi… in processSample() argument
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
685 sv = &initEv(&nev[cnt], timestamp, type, sensor)->acceleration; in processSample()
692 if (mSensorState[sensor].enable && isSampleIntervalSatisfied(sensor, timestamp)) { in processSample()
712 ue = &initEv(&nev[cnt], timestamp, in processSample()
732 && isSampleIntervalSatisfied(COMMS_SENSOR_ACCEL_UNCALIBRATED, timestamp)) { in processSample()
737 && isSampleIntervalSatisfied(COMMS_SENSOR_ACCEL_WRIST_AWARE, timestamp)) { in processSample()
738 sv = &initEv(&nev[cnt++], timestamp, in processSample()
748 sv = &initEv(&nev[cnt], timestamp, type, sensor)->magnetic; in processSample()
755 if (mSensorState[sensor].enable && isSampleIntervalSatisfied(sensor, timestamp)) { in processSample()
759 ue = &initEv(&nev[cnt], timestamp, in processSample()
771 && isSampleIntervalSatisfied(COMMS_SENSOR_MAG_UNCALIBRATED, timestamp)) { in processSample()
783 void HubConnection::processSample(uint64_t timestamp, uint32_t type, uint32_t sensor, struct ThreeA… in processSample() argument
795 sv = &initEv(&nev[cnt], timestamp, type, sensor)->acceleration; in processSample()
802 if (mSensorState[sensor].enable && isSampleIntervalSatisfied(sensor, timestamp)) { in processSample()
806 ue = &initEv(&nev[cnt], timestamp, in processSample()
818 && isSampleIntervalSatisfied(COMMS_SENSOR_ACCEL_UNCALIBRATED, timestamp)) { in processSample()
823 && isSampleIntervalSatisfied(COMMS_SENSOR_ACCEL_WRIST_AWARE, timestamp)) { in processSample()
824 sv = &initEv(&nev[cnt], timestamp, in processSample()
835 sv = &initEv(&nev[cnt], timestamp, type, sensor)->gyro; in processSample()
842 if (mSensorState[sensor].enable && isSampleIntervalSatisfied(sensor, timestamp)) { in processSample()
846 ue = &initEv(&nev[cnt], timestamp, in processSample()
858 && isSampleIntervalSatisfied(COMMS_SENSOR_GYRO_UNCALIBRATED, timestamp)) { in processSample()
863 && isSampleIntervalSatisfied(COMMS_SENSOR_GYRO_WRIST_AWARE, timestamp)) { in processSample()
864 sv = &initEv(&nev[cnt], timestamp, in processSample()
887 sv = &initEv(&nev[cnt], timestamp, type, sensor)->magnetic; in processSample()
894 if (mSensorState[sensor].enable && isSampleIntervalSatisfied(sensor, timestamp)) { in processSample()
898 ue = &initEv(&nev[cnt], timestamp, in processSample()
910 && isSampleIntervalSatisfied(COMMS_SENSOR_MAG_UNCALIBRATED, 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()
1095 uint64_t timestamp; in processBuf() local
1287 timestamp = data->referenceTime; in processBuf()
1301 …timestamp += ((uint64_t)data->oneSamples[i].deltaTime) << delta_time_shift_table[data->oneSamples[… in processBuf()
1302 … processSample(timestamp, type, currSensor, &data->oneSamples[i], data->firstSample.highAccuracy); in processBuf()
1310 …timestamp += ((uint64_t)data->rawThreeSamples[i].deltaTime) << delta_time_shift_table[data->rawThr… in processBuf()
1311 …processSample(timestamp, type, currSensor, &data->rawThreeSamples[i], data->firstSample.highAccura… in processBuf()
1319 …timestamp += ((uint64_t)data->threeSamples[i].deltaTime) << delta_time_shift_table[data->threeSamp… in processBuf()
1320 …processSample(timestamp, type, currSensor, &data->threeSamples[i], data->firstSample.highAccuracy); in processBuf()
1344 ev.timestamp = 0; in processBuf()
1963 if ((uint64_t)nev->timestamp > j.second.lastTimestamp in sendDirectReportEvent()
1965 nev->timestamp - j.second.lastTimestamp, in sendDirectReportEvent()
1969 j.second.lastTimestamp = nev->timestamp; in sendDirectReportEvent()
2184 bool HubConnection::isSampleIntervalSatisfied(int handle, uint64_t timestamp) { in isSampleIntervalSatisfied() argument
2189 if (mSensorState[handle].lastTimestamp >= timestamp in isSampleIntervalSatisfied()
2192 } else if (intervalLargeEnough(timestamp - mSensorState[handle].lastTimestamp, in isSampleIntervalSatisfied()
2194 mSensorState[handle].lastTimestamp = timestamp; in isSampleIntervalSatisfied()