Lines Matching refs:timestamp

337         *ts = sensors.quat.timestamp;
339 if (sensors.quat.timestamp_prev != sensors.quat.timestamp)
343 *ts = sensors.gyro.timestamp;
345 if (sensors.gyro.timestamp_prev != sensors.gyro.timestamp)
349 *ts = sensors.accel.timestamp;
351 if (sensors.accel.timestamp_prev != sensors.accel.timestamp)
355 *ts = sensors.compass.timestamp;
357 if (sensors.compass.timestamp_prev != sensors.compass.timestamp)
367 /** Gets best timestamp and if there is a new piece of data for a 9-axis sensor combination.
381 *ts = sensors.quat.timestamp;
383 if (sensors.quat.timestamp_prev != sensors.quat.timestamp)
432 /** Gets best timestamp and if there is a new piece of data for a 9-axis sensor combination.
458 /** Gets best timestamp and if there is a new piece of data for a 9-axis sensor combination.
597 /** Get last timestamp across all 3 sensors that are on.
598 * This find out which timestamp has the largest value for sensors that are on.
603 inv_time_t timestamp = 0;
605 timestamp = sensors.accel.timestamp;
608 if (timestamp < sensors.gyro.timestamp) {
609 timestamp = sensors.gyro.timestamp;
611 MPL_LOGV("g ts: %lld", timestamp);
614 if (timestamp < sensors.compass.timestamp) {
615 timestamp = sensors.compass.timestamp;
619 if (timestamp < sensors.temp.timestamp) {
620 timestamp = sensors.temp.timestamp;
624 if (timestamp < sensors.quat.timestamp) {
625 timestamp = sensors.quat.timestamp;
627 MPL_LOGV("q ts: %lld", timestamp);
630 return timestamp;
1003 * @param[in] timestamp
1007 inv_error_t inv_build_accel(const long *accel, int status, inv_time_t timestamp)
1014 fwrite(&timestamp, sizeof(timestamp), 1, inv_data_builder.file);
1033 sensors.accel.timestamp_prev = sensors.accel.timestamp;
1034 sensors.accel.timestamp = timestamp;
1042 * @param[in] timestamp Monotonic time stamp, for Android it's in nanoseconds.
1046 inv_error_t inv_build_gyro(const short *gyro, inv_time_t timestamp)
1053 fwrite(&timestamp, sizeof(timestamp), 1, inv_data_builder.file);
1059 sensors.gyro.timestamp_prev = sensors.gyro.timestamp;
1060 sensors.gyro.timestamp = timestamp;
1073 * @param[in] timestamp Monotonic time stamp, for Android it's in nanoseconds.
1078 inv_time_t timestamp)
1085 fwrite(&timestamp, sizeof(timestamp), 1, inv_data_builder.file);
1106 sensors.compass.timestamp_prev = sensors.compass.timestamp;
1107 sensors.compass.timestamp = timestamp;
1115 * @param[in] timestamp Monotonic time stamp; for Android it's in
1119 inv_error_t inv_build_temp(const long temp, inv_time_t timestamp)
1126 fwrite(&timestamp, sizeof(timestamp), 1, inv_data_builder.file);
1131 sensors.temp.timestamp_prev = sensors.temp.timestamp;
1132 sensors.temp.timestamp = timestamp;
1144 * @param[in] timestamp
1145 * @param[in] timestamp Monotonic time stamp; for Android it's in
1150 inv_error_t inv_build_quat(const long *quat, int status, inv_time_t timestamp)
1157 fwrite(&timestamp, sizeof(timestamp), 1, inv_data_builder.file);
1171 sensors.quat.timestamp_prev = sensors.quat.timestamp;
1172 sensors.quat.timestamp = timestamp;
1183 inv_store_gaming_quaternion(quat, timestamp);
1187 inv_set_compass_correction(identity, timestamp);
1192 inv_error_t inv_build_pressure(const long pressure, int status, inv_time_t timestamp)
1406 current_time = sensors.gyro.timestamp;
1410 current_time = MAX(current_time, sensors.accel.timestamp);
1414 current_time = MAX(current_time, sensors.compass.timestamp);
1418 current_time = MAX(current_time, sensors.temp.timestamp);
1422 current_time = MAX(current_time, sensors.quat.timestamp);
1429 if (inv_delta_time_ms(current_time, sensors.gyro.timestamp) >= 2000)
1431 if (inv_delta_time_ms(current_time, sensors.accel.timestamp) >= 2000)
1433 if (inv_delta_time_ms(current_time, sensors.compass.timestamp) >= 2000)
1436 if (inv_delta_time_ms(current_time, sensors.temp.timestamp) >= 2000)
1449 /** Gets a whole set of accel data including data, accuracy and timestamp.
1452 * @param[out] timestamp The timestamp of the data sample.
1454 void inv_get_accel_set(long *data, int8_t *accuracy, inv_time_t *timestamp)
1459 if (timestamp != NULL) {
1460 *timestamp = sensors.accel.timestamp;
1467 /** Gets a whole set of gyro data including data, accuracy and timestamp.
1470 * @param[out] timestamp The timestamp of the data sample.
1472 void inv_get_gyro_set(long *data, int8_t *accuracy, inv_time_t *timestamp)
1475 if (timestamp != NULL) {
1476 *timestamp = sensors.gyro.timestamp;
1483 /** Gets a whole set of gyro raw data including data, accuracy and timestamp.
1486 * @param[out] timestamp The timestamp of the data sample.
1488 void inv_get_gyro_set_raw(long *data, int8_t *accuracy, inv_time_t *timestamp)
1491 if (timestamp != NULL) {
1492 *timestamp = sensors.gyro.timestamp;
1507 /** Gets a whole set of compass data including data, accuracy and timestamp.
1510 * @param[out] timestamp The timestamp of the data sample.
1512 void inv_get_compass_set(long *data, int8_t *accuracy, inv_time_t *timestamp)
1515 if (timestamp != NULL) {
1516 *timestamp = sensors.compass.timestamp;
1526 /** Gets a whole set of compass raw data including data, accuracy and timestamp.
1529 * @param[out] timestamp The timestamp of the data sample.
1531 void inv_get_compass_set_raw(long *data, int8_t *accuracy, inv_time_t *timestamp)
1534 if (timestamp != NULL) {
1535 *timestamp = sensors.compass.timestamp;
1541 /** Gets a whole set of temperature data including data, accuracy and timestamp.
1544 * @param[out] timestamp The timestamp of the data sample.
1546 void inv_get_temp_set(long *data, int *accuracy, inv_time_t *timestamp)
1549 if (timestamp)
1550 *timestamp = sensors.temp.timestamp;