fix(type): add imu ets in type

This commit is contained in:
kalman 2019-03-29 17:45:20 +08:00
parent bab2e23e39
commit f8c56986a9
2 changed files with 3 additions and 0 deletions

View File

@ -704,6 +704,8 @@ struct MYNTEYE_API ImuData {
* </p> * </p>
*/ */
std::uint8_t flag; std::uint8_t flag;
/** Is external time source */
bool is_ets = false;
/** IMU timestamp in 1us */ /** IMU timestamp in 1us */
std::uint64_t timestamp; std::uint64_t timestamp;
/** IMU accelerometer data for 3-axis: X, Y, Z. */ /** IMU accelerometer data for 3-axis: X, Y, Z. */

View File

@ -84,6 +84,7 @@ void Motions::SetMotionCallback(motion_callback_t callback) {
imu->frame_id = seg.frame_id; imu->frame_id = seg.frame_id;
imu->timestamp = seg.timestamp; imu->timestamp = seg.timestamp;
imu->flag = seg.flag; imu->flag = seg.flag;
imu->is_ets = seg.is_ets;
imu->temperature = seg.temperature / 326.8f + 25; imu->temperature = seg.temperature / 326.8f + 25;
imu->accel[0] = seg.accel[0] * 1.f * accel_range / 0x10000; imu->accel[0] = seg.accel[0] * 1.f * accel_range / 0x10000;
imu->accel[1] = seg.accel[1] * 1.f * accel_range / 0x10000; imu->accel[1] = seg.accel[1] * 1.f * accel_range / 0x10000;