diff options
author | Xavier Hallade <xavier.hallade@intel.com> | 2016-02-11 16:50:09 +0100 |
---|---|---|
committer | Xavier Hallade <xavier.hallade@intel.com> | 2016-02-11 16:50:09 +0100 |
commit | 652bdad279f7769523d3c6faa609448028907256 (patch) | |
tree | b8890079db00c52719833127283ea7cde5cf74e6 /tracker-rs/ftnoir_tracker_rs_worker.cpp | |
parent | 922f1afd56f231d373c4f47c9d5c5dc09b735836 (diff) |
tracker/rs: updated runtime to 2016 R1.
Diffstat (limited to 'tracker-rs/ftnoir_tracker_rs_worker.cpp')
-rw-r--r-- | tracker-rs/ftnoir_tracker_rs_worker.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tracker-rs/ftnoir_tracker_rs_worker.cpp b/tracker-rs/ftnoir_tracker_rs_worker.cpp index c387b731..213f13ff 100644 --- a/tracker-rs/ftnoir_tracker_rs_worker.cpp +++ b/tracker-rs/ftnoir_tracker_rs_worker.cpp @@ -29,13 +29,14 @@ void RSTrackerWorkerThread::run(){ while(!isInterruptionRequested()){ retValue = rs_tracker_impl_update_pose(pose); - if(retValue!=0 && retValue!=-303){ // -303 is only a timeout. + if(retValue == 0){ // success + QMutexLocker lock(&mMutex); + memcpy(mPose, pose, sizeof(pose)); + } + else if(retValue != -303){ // pose update failed. -303 is OK as it's only a timeout. emit trackingHasFinished(retValue); break; } - - QMutexLocker lock(&mMutex); - memcpy(mPose, pose, sizeof(pose)); } rs_tracker_impl_end(); |