From e1485e210301132036be3a2fd19da9405e2e08d2 Mon Sep 17 00:00:00 2001 From: TinyO Date: Tue, 22 Oct 2019 11:47:43 +0800 Subject: [PATCH] fix(*): sample record lost motion. --- samples/dataset.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/samples/dataset.cc b/samples/dataset.cc index fe20f3c..74a5ef7 100644 --- a/samples/dataset.cc +++ b/samples/dataset.cc @@ -131,15 +131,14 @@ void Dataset::SaveMotionData(const api::MotionData &data) { auto &&writer = GetMotionWriter(); // auto seq = data.imu->serial_number; auto seq = motion_count_; - if (data.imu->flag == 1 || data.imu->flag == 2) { - writer->ofs << seq << ", " << static_cast(data.imu->flag) << ", " + writer->ofs << seq << ", " << static_cast(data.imu->flag) << ", " << data.imu->timestamp << ", " << data.imu->accel[0] << ", " << data.imu->accel[1] << ", " << data.imu->accel[2] << ", " << data.imu->gyro[0] << ", " << data.imu->gyro[1] << ", " << data.imu->gyro[2] << ", " << data.imu->temperature << std::endl; - ++motion_count_; - } + ++motion_count_; + /* if(motion_count_ != seq) { LOG(INFO) << "motion_count_ != seq !" << " motion_count_: " << motion_count_