Lines Matching refs:mSensorState

137     memset(&mSensorState, 0x00, sizeof(mSensorState));  in HubConnection()
179 mSensorState[COMMS_SENSOR_ACCEL].sensorType = SENS_TYPE_ACCEL; in HubConnection()
180 mSensorState[COMMS_SENSOR_ACCEL].alt[0] = COMMS_SENSOR_ACCEL_UNCALIBRATED; in HubConnection()
181 mSensorState[COMMS_SENSOR_ACCEL].alt[1] = COMMS_SENSOR_ACCEL_WRIST_AWARE; in HubConnection()
182 mSensorState[COMMS_SENSOR_ACCEL_UNCALIBRATED].sensorType = SENS_TYPE_ACCEL; in HubConnection()
183 mSensorState[COMMS_SENSOR_ACCEL_UNCALIBRATED].primary = COMMS_SENSOR_ACCEL; in HubConnection()
184 mSensorState[COMMS_SENSOR_ACCEL_UNCALIBRATED].alt[0] = COMMS_SENSOR_ACCEL; in HubConnection()
185 mSensorState[COMMS_SENSOR_ACCEL_UNCALIBRATED].alt[1] = COMMS_SENSOR_ACCEL_WRIST_AWARE; in HubConnection()
186 mSensorState[COMMS_SENSOR_ACCEL_WRIST_AWARE].sensorType = SENS_TYPE_ACCEL; in HubConnection()
187 mSensorState[COMMS_SENSOR_ACCEL_WRIST_AWARE].primary = COMMS_SENSOR_ACCEL; in HubConnection()
188 mSensorState[COMMS_SENSOR_ACCEL_WRIST_AWARE].alt[0] = COMMS_SENSOR_ACCEL; in HubConnection()
189 mSensorState[COMMS_SENSOR_ACCEL_WRIST_AWARE].alt[1] = COMMS_SENSOR_ACCEL_UNCALIBRATED; in HubConnection()
190 mSensorState[COMMS_SENSOR_GYRO].sensorType = SENS_TYPE_GYRO; in HubConnection()
191 mSensorState[COMMS_SENSOR_GYRO].alt[0] = COMMS_SENSOR_GYRO_UNCALIBRATED; in HubConnection()
192 mSensorState[COMMS_SENSOR_GYRO].alt[1] = COMMS_SENSOR_GYRO_WRIST_AWARE; in HubConnection()
193 mSensorState[COMMS_SENSOR_GYRO_UNCALIBRATED].sensorType = SENS_TYPE_GYRO; in HubConnection()
194 mSensorState[COMMS_SENSOR_GYRO_UNCALIBRATED].primary = COMMS_SENSOR_GYRO; in HubConnection()
195 mSensorState[COMMS_SENSOR_GYRO_UNCALIBRATED].alt[0] = COMMS_SENSOR_GYRO; in HubConnection()
196 mSensorState[COMMS_SENSOR_GYRO_UNCALIBRATED].alt[1] = COMMS_SENSOR_GYRO_WRIST_AWARE; in HubConnection()
197 mSensorState[COMMS_SENSOR_GYRO_WRIST_AWARE].sensorType = SENS_TYPE_GYRO; in HubConnection()
198 mSensorState[COMMS_SENSOR_GYRO_WRIST_AWARE].primary = COMMS_SENSOR_GYRO; in HubConnection()
199 mSensorState[COMMS_SENSOR_GYRO_WRIST_AWARE].alt[0] = COMMS_SENSOR_GYRO; in HubConnection()
200 mSensorState[COMMS_SENSOR_GYRO_WRIST_AWARE].alt[1] = COMMS_SENSOR_GYRO_UNCALIBRATED; in HubConnection()
201 mSensorState[COMMS_SENSOR_MAG].sensorType = SENS_TYPE_MAG; in HubConnection()
202 mSensorState[COMMS_SENSOR_MAG].alt[0] = COMMS_SENSOR_MAG_UNCALIBRATED; in HubConnection()
203 mSensorState[COMMS_SENSOR_MAG_UNCALIBRATED].sensorType = SENS_TYPE_MAG; in HubConnection()
204 mSensorState[COMMS_SENSOR_MAG_UNCALIBRATED].primary = COMMS_SENSOR_MAG; in HubConnection()
205 mSensorState[COMMS_SENSOR_MAG_UNCALIBRATED].alt[0] = COMMS_SENSOR_MAG; in HubConnection()
206 mSensorState[COMMS_SENSOR_LIGHT].sensorType = SENS_TYPE_ALS; in HubConnection()
207 mSensorState[COMMS_SENSOR_PROXIMITY].sensorType = SENS_TYPE_PROX; in HubConnection()
208 mSensorState[COMMS_SENSOR_PRESSURE].sensorType = SENS_TYPE_BARO; in HubConnection()
209 mSensorState[COMMS_SENSOR_TEMPERATURE].sensorType = SENS_TYPE_TEMP; in HubConnection()
210 mSensorState[COMMS_SENSOR_AMBIENT_TEMPERATURE].sensorType = SENS_TYPE_AMBIENT_TEMP; in HubConnection()
211 mSensorState[COMMS_SENSOR_ORIENTATION].sensorType = SENS_TYPE_ORIENTATION; in HubConnection()
212 mSensorState[COMMS_SENSOR_WINDOW_ORIENTATION].sensorType = SENS_TYPE_WIN_ORIENTATION; in HubConnection()
213 mSensorState[COMMS_SENSOR_WINDOW_ORIENTATION].rate = SENSOR_RATE_ONCHANGE; in HubConnection()
214 mSensorState[COMMS_SENSOR_STEP_DETECTOR].sensorType = SENS_TYPE_STEP_DETECT; in HubConnection()
215 mSensorState[COMMS_SENSOR_STEP_DETECTOR].rate = SENSOR_RATE_ONCHANGE; in HubConnection()
216 mSensorState[COMMS_SENSOR_STEP_COUNTER].sensorType = SENS_TYPE_STEP_COUNT; in HubConnection()
217 mSensorState[COMMS_SENSOR_SIGNIFICANT_MOTION].sensorType = SENS_TYPE_SIG_MOTION; in HubConnection()
218 mSensorState[COMMS_SENSOR_SIGNIFICANT_MOTION].rate = SENSOR_RATE_ONESHOT; in HubConnection()
219 mSensorState[COMMS_SENSOR_GRAVITY].sensorType = SENS_TYPE_GRAVITY; in HubConnection()
220 mSensorState[COMMS_SENSOR_LINEAR_ACCEL].sensorType = SENS_TYPE_LINEAR_ACCEL; in HubConnection()
221 mSensorState[COMMS_SENSOR_ROTATION_VECTOR].sensorType = SENS_TYPE_ROTATION_VECTOR; in HubConnection()
222 mSensorState[COMMS_SENSOR_GEO_MAG].sensorType = SENS_TYPE_GEO_MAG_ROT_VEC; in HubConnection()
223 mSensorState[COMMS_SENSOR_GAME_ROTATION_VECTOR].sensorType = SENS_TYPE_GAME_ROT_VECTOR; in HubConnection()
224 mSensorState[COMMS_SENSOR_HALL].sensorType = SENS_TYPE_HALL; in HubConnection()
225 mSensorState[COMMS_SENSOR_HALL].rate = SENSOR_RATE_ONCHANGE; in HubConnection()
226 mSensorState[COMMS_SENSOR_SYNC].sensorType = SENS_TYPE_VSYNC; in HubConnection()
227 mSensorState[COMMS_SENSOR_SYNC].rate = SENSOR_RATE_ONCHANGE; in HubConnection()
228 mSensorState[COMMS_SENSOR_TILT].sensorType = SENS_TYPE_TILT; in HubConnection()
229 mSensorState[COMMS_SENSOR_TILT].rate = SENSOR_RATE_ONCHANGE; in HubConnection()
230 mSensorState[COMMS_SENSOR_GESTURE].sensorType = SENS_TYPE_GESTURE; in HubConnection()
231 mSensorState[COMMS_SENSOR_GESTURE].rate = SENSOR_RATE_ONESHOT; in HubConnection()
232 mSensorState[COMMS_SENSOR_DOUBLE_TWIST].sensorType = SENS_TYPE_DOUBLE_TWIST; in HubConnection()
233 mSensorState[COMMS_SENSOR_DOUBLE_TWIST].rate = SENSOR_RATE_ONCHANGE; in HubConnection()
234 mSensorState[COMMS_SENSOR_DOUBLE_TAP].sensorType = SENS_TYPE_DOUBLE_TAP; in HubConnection()
235 mSensorState[COMMS_SENSOR_DOUBLE_TAP].rate = SENSOR_RATE_ONCHANGE; in HubConnection()
236 mSensorState[COMMS_SENSOR_WRIST_TILT].sensorType = SENS_TYPE_WRIST_TILT; in HubConnection()
237 mSensorState[COMMS_SENSOR_DOUBLE_TOUCH].sensorType = SENS_TYPE_DOUBLE_TOUCH; in HubConnection()
238 mSensorState[COMMS_SENSOR_DOUBLE_TOUCH].rate = SENSOR_RATE_ONESHOT; in HubConnection()
239 mSensorState[COMMS_SENSOR_GAZE].sensorType = SENS_TYPE_GAZE; in HubConnection()
240 mSensorState[COMMS_SENSOR_GAZE].rate = SENSOR_RATE_ONESHOT; in HubConnection()
241 mSensorState[COMMS_SENSOR_UNGAZE].sensorType = SENS_TYPE_UNGAZE; in HubConnection()
242 mSensorState[COMMS_SENSOR_UNGAZE].rate = SENSOR_RATE_ONESHOT; in HubConnection()
243 mSensorState[COMMS_SENSOR_HUMIDITY].sensorType = SENS_TYPE_HUMIDITY; in HubConnection()
692 if (mSensorState[sensor].enable && isSampleIntervalSatisfied(sensor, timestamp)) { in processSample()
731 if (mSensorState[COMMS_SENSOR_ACCEL_UNCALIBRATED].enable in processSample()
736 if (mSensorState[COMMS_SENSOR_ACCEL_WRIST_AWARE].enable in processSample()
755 if (mSensorState[sensor].enable && isSampleIntervalSatisfied(sensor, timestamp)) { in processSample()
770 if (mSensorState[COMMS_SENSOR_MAG_UNCALIBRATED].enable in processSample()
802 if (mSensorState[sensor].enable && isSampleIntervalSatisfied(sensor, timestamp)) { in processSample()
817 if (mSensorState[COMMS_SENSOR_ACCEL_UNCALIBRATED].enable in processSample()
822 if (mSensorState[COMMS_SENSOR_ACCEL_WRIST_AWARE].enable in processSample()
842 if (mSensorState[sensor].enable && isSampleIntervalSatisfied(sensor, timestamp)) { in processSample()
857 if (mSensorState[COMMS_SENSOR_GYRO_UNCALIBRATED].enable in processSample()
862 if (mSensorState[COMMS_SENSOR_GYRO_WRIST_AWARE].enable in processSample()
894 if (mSensorState[sensor].enable && isSampleIntervalSatisfied(sensor, timestamp)) { in processSample()
909 if (mSensorState[COMMS_SENSOR_MAG_UNCALIBRATED].enable in processSample()
1004 if (mSensorState[i].sensorType && mSensorState[i].enable) { in restoreSensorState()
1010 … cmd.sensorType, i, mSensorState[i].enable, frequency_q10_to_period_ns(mSensorState[i].rate), in restoreSensorState()
1011 mSensorState[i].latency); in restoreSensorState()
1333 primary = mSensorState[sensor].primary; in processBuf()
1557 cmd->sensorType = mSensorState[handle].sensorType; in initConfigCmd()
1559 if (mSensorState[handle].enable) { in initConfigCmd()
1561 cmd->rate = mSensorState[handle].rate; in initConfigCmd()
1562 cmd->latency = mSensorState[handle].latency; in initConfigCmd()
1572 uint8_t alt = mSensorState[handle].alt[i]; in initConfigCmd()
1575 if (!mSensorState[alt].enable) continue; in initConfigCmd()
1579 if (mSensorState[alt].rate > cmd->rate) { in initConfigCmd()
1580 cmd->rate = mSensorState[alt].rate; in initConfigCmd()
1582 if (mSensorState[alt].latency < cmd->latency) { in initConfigCmd()
1583 cmd->latency = mSensorState[alt].latency; in initConfigCmd()
1604 mSensorState[handle].enable = enable; in queueActivate()
1631 mSensorState[handle].rate != SENSOR_RATE_ONCHANGE && in queueSetDelay()
1632 mSensorState[handle].rate != SENSOR_RATE_ONESHOT) { in queueSetDelay()
1633 mSensorState[handle].rate = period_ns_to_frequency_q10(sampling_period_ns); in queueSetDelay()
1662 mSensorState[handle].rate != SENSOR_RATE_ONCHANGE && in queueBatch()
1663 mSensorState[handle].rate != SENSOR_RATE_ONESHOT) { in queueBatch()
1664 mSensorState[handle].rate = period_ns_to_frequency_q10(sampling_period_ns); in queueBatch()
1666 mSensorState[handle].latency = max_report_latency_ns; in queueBatch()
1700 primary = mSensorState[handle].primary; in queueFlushInternal()
1988 for (auto handle : mSensorState[handle].alt) { in mergeDirectReportRequest()
2151 if (mSensorState[handle].alt[i] != COMMS_SENSOR_INVALID) { in updateSampleRate()
2153 mSensorToChannel.find(mSensorState[handle].alt[i]) != mSensorToChannel.end(); in updateSampleRate()
2164 (frequency_q10_to_period_ns(mSensorState[handle].rate) + PERIOD_800HZ / 2) in updateSampleRate()
2170 mSensorState[handle].desiredTSample = desiredTSample; in updateSampleRate()
2175 mSensorState[handle].desiredTSample = INT64_MAX; in updateSampleRate()
2189 if (mSensorState[handle].lastTimestamp >= timestamp in isSampleIntervalSatisfied()
2190 || mSensorState[handle].desiredTSample == INT64_MAX) { in isSampleIntervalSatisfied()
2192 } else if (intervalLargeEnough(timestamp - mSensorState[handle].lastTimestamp, in isSampleIntervalSatisfied()
2193 mSensorState[handle].desiredTSample)) { in isSampleIntervalSatisfied()
2194 mSensorState[handle].lastTimestamp = timestamp; in isSampleIntervalSatisfied()