diff options
author | Ballista Milsim <ballista.milsim@gmail.com> | 2020-03-21 12:39:57 +0100 |
---|---|---|
committer | Ballista Milsim <ballista.milsim@gmail.com> | 2020-03-21 12:39:57 +0100 |
commit | cf89cd0ee392a73c7b92d0220b3963f1901908ae (patch) | |
tree | cf27da201041b870f1668b24b3c88506c9e80523 /tracker-tobii/ftnoir_tracker_tobii.cpp | |
parent | 77885b4d65f49fd220d2426c01cd336402b86c60 (diff) |
Fixes according to code review.
Diffstat (limited to 'tracker-tobii/ftnoir_tracker_tobii.cpp')
-rw-r--r-- | tracker-tobii/ftnoir_tracker_tobii.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tracker-tobii/ftnoir_tracker_tobii.cpp b/tracker-tobii/ftnoir_tracker_tobii.cpp index f0d66ae4..43cb1662 100644 --- a/tracker-tobii/ftnoir_tracker_tobii.cpp +++ b/tracker-tobii/ftnoir_tracker_tobii.cpp @@ -2,6 +2,8 @@ #include "api/plugin-api.hpp" #include "compat/math.hpp" +tobii::~tobii() = default; + module_status tobii::start_tracker(QFrame*) { t.start(); @@ -18,6 +20,9 @@ void tobii::data(double *data) p.position_xyz[1] = p.position_xyz[1] - center_pose.position_xyz[1]; p.position_xyz[2] = p.position_xyz[2] - center_pose.position_xyz[2]; } + else { + center_pose = p; + } data[0] = clamp(p.position_xyz[0] * 30.0 / 300.0, -30.0, 30.0); data[1] = clamp(p.position_xyz[1] * 30.0 / 300.0, -30.0, 30.0); data[2] = clamp(p.position_xyz[2] * 30.0 / 300.0, -30.0, 30.0); |