diff --git a/src/mynteye/device/motions.cc b/src/mynteye/device/motions.cc index cd1a8d4..7a2bcd4 100644 --- a/src/mynteye/device/motions.cc +++ b/src/mynteye/device/motions.cc @@ -36,7 +36,6 @@ void Motions::SetMotionCallback(motion_callback_t callback) { if (motion_callback_) { channels_->SetImuCallback([this](const ImuPacket &packet) { if (!motion_callback_ && !motion_datas_enabled_) { - LOG(WARNING) << ""; return; } for (auto &&seg : packet.segments) { @@ -57,7 +56,9 @@ void Motions::SetMotionCallback(motion_callback_t callback) { std::lock_guard _(mtx_datas_); motion_data_t data = {imu}; - motion_datas_.push_back(data); + if (motion_datas_enabled_) { + motion_datas_.push_back(data); + } motion_callback_(data); }