From 6d0fa3a3ca7697597bf829a72e365d6a09d2e301 Mon Sep 17 00:00:00 2001 From: John Zhao Date: Fri, 22 Feb 2019 14:57:20 +0800 Subject: [PATCH] fix(correspondence): improve warning if not start motion tracking --- src/mynteye/api/correspondence.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/mynteye/api/correspondence.cc b/src/mynteye/api/correspondence.cc index 30f9176..6ebc7da 100644 --- a/src/mynteye/api/correspondence.cc +++ b/src/mynteye/api/correspondence.cc @@ -200,8 +200,11 @@ std::vector Correspondence::GetReadyStreamData(bool matched) { { std::lock_guard _(mtx_motion_datas_); if (motion_datas_.empty()) { - LOG(WARNING) << "motion data is unexpected empty!"; - return {}; + LOG(WARNING) << "motion data is unexpected empty!" + "\n\n Please ensure Start(Source::MOTION_TRACKING) " + "or Start(Source::ALL)\n"; + std::lock_guard _(mtx_stream_datas_); + return std::move(matched ? stream_datas_match_ : stream_datas_); } imu_stamp = motion_datas_.back().imu->timestamp; }