summaryrefslogtreecommitdiffhomepage
path: root/tracker-rs/ftnoir_tracker_rs_worker.cpp
diff options
context:
space:
mode:
authorXavier Hallade <xavier.hallade@intel.com>2016-02-11 16:50:09 +0100
committerXavier Hallade <xavier.hallade@intel.com>2016-02-11 16:50:09 +0100
commit652bdad279f7769523d3c6faa609448028907256 (patch)
treeb8890079db00c52719833127283ea7cde5cf74e6 /tracker-rs/ftnoir_tracker_rs_worker.cpp
parent922f1afd56f231d373c4f47c9d5c5dc09b735836 (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.cpp9
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();