summaryrefslogtreecommitdiffhomepage
path: root/tracker-tobii/thread.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2020-11-20 02:23:26 +0000
committerGitHub <noreply@github.com>2020-11-20 02:23:26 +0000
commit058942f40e17e091b91df5436d771d61203ccc73 (patch)
tree2562bb275b5ee9d5eed1cd383642d587aaf07ad2 /tracker-tobii/thread.hpp
parentf0e7870d66bbaf42ec0f1cd03dcc2da0dee6dd56 (diff)
parentcf89cd0ee392a73c7b92d0220b3963f1901908ae (diff)
Merge pull request #1037 from ballista-milsim/tracker-tobii
WIP Tobii Eye tracker support.
Diffstat (limited to 'tracker-tobii/thread.hpp')
-rw-r--r--tracker-tobii/thread.hpp35
1 files changed, 35 insertions, 0 deletions
diff --git a/tracker-tobii/thread.hpp b/tracker-tobii/thread.hpp
new file mode 100644
index 00000000..d311db87
--- /dev/null
+++ b/tracker-tobii/thread.hpp
@@ -0,0 +1,35 @@
+#pragma once
+
+#include <QThread>
+#include <QCoreApplication>
+
+#include <tobii/tobii.h>
+#include <tobii/tobii_streams.h>
+#include <atomic>
+#include <vector>
+#include <string>
+
+class tobii_thread : public QThread
+{
+ Q_OBJECT
+ void run() override;
+
+public:
+ tobii_thread()
+ {
+ head_pose = new tobii_head_pose_t();
+ }
+ ~tobii_thread() override;
+
+ tobii_head_pose_t* head_pose;
+
+private:
+ tobii_api_t* api;
+ tobii_device_t* device;
+
+ static constexpr unsigned int retries = 300;
+ static constexpr unsigned int interval = 100;
+
+ QString error_last = "";
+ std::atomic<bool> exit_thread = false;
+};