summaryrefslogtreecommitdiffhomepage
path: root/logic/tracker.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'logic/tracker.cpp')
-rw-r--r--logic/tracker.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/logic/tracker.cpp b/logic/tracker.cpp
index 007189ec..9b085108 100644
--- a/logic/tracker.cpp
+++ b/logic/tracker.cpp
@@ -288,9 +288,6 @@ void Tracker::logic()
for (int i = 3; i < 6; i++)
value(i) = map(value(i), m(i));
- for (int i = 0; i < 6; i++)
- value(i) += m(i).opts.zero;
-
if (get(f_zero))
for (int i = 0; i < 6; i++)
value(i) = 0;
@@ -348,6 +345,10 @@ void Tracker::logic()
(void) map(raw_6dof(i), m(i));
}
+ // custom zero position
+ for (int i = 0; i < 6; i++)
+ value(i) += m(i).opts.zero * (m(i).opts.invert ? -1 : 1);
+
if (!nanp)
libs.pProtocol->pose(value);