summaryrefslogtreecommitdiffhomepage
path: root/facetracknoir
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2014-09-17 04:24:12 +0200
committerStanislaw Halik <sthalik@misaki.pl>2014-09-17 05:31:19 +0200
commitd0d3be7f3895df5997647394853986096f889a1a (patch)
tree2e08b333a1ec7ad0a4e2de2eba32a906b2b79400 /facetracknoir
parentb81d4ac044e2e61a69f02ddecd8aedeb780c1a7b (diff)
hook up axis src logic
Issue: #52
Diffstat (limited to 'facetracknoir')
-rw-r--r--facetracknoir/tracker.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/facetracknoir/tracker.cpp b/facetracknoir/tracker.cpp
index ca505315..29855b31 100644
--- a/facetracknoir/tracker.cpp
+++ b/facetracknoir/tracker.cpp
@@ -119,7 +119,13 @@ void Tracker::run() {
QMutexLocker foo(&mtx);
for (int i = 0; i < 6; i++)
- mainApp->axis(i).headPos = newpose[i];
+ {
+ auto& axis = mainApp->axis(i);
+ int k = axis.opts.src;
+ if (k < 0 || k >= 6)
+ continue;
+ axis.headPos = newpose[k];
+ }
if (do_center) {
for (int i = 0; i < 6; i++)