diff options
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); |