diff options
author | Ballista Milsim <ballista.milsim@gmail.com> | 2020-01-23 15:40:15 +0100 |
---|---|---|
committer | Ballista Milsim <ballista.milsim@gmail.com> | 2020-01-23 15:40:15 +0100 |
commit | 77885b4d65f49fd220d2426c01cd336402b86c60 (patch) | |
tree | afd0a202db23d7a1db8e6c0cb09f272759162d1a /tracker-tobii/thread.hpp | |
parent | fb994308266093382fffecb8a3fd2645ab811117 (diff) |
WIP Tobii Eye tracker support.
Diffstat (limited to 'tracker-tobii/thread.hpp')
-rw-r--r-- | tracker-tobii/thread.hpp | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/tracker-tobii/thread.hpp b/tracker-tobii/thread.hpp new file mode 100644 index 00000000..a2838272 --- /dev/null +++ b/tracker-tobii/thread.hpp @@ -0,0 +1,37 @@ +#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; + +signals: + void tobii_error_signal(QString error_message); + void tobii_ready_signal(); + +public: + tobii_thread(); + ~tobii_thread() override; + + tobii_head_pose_t* head_pose; + +private: + tobii_api_t* api; + tobii_device_t* device; + + const unsigned int retries = 300; + const unsigned int interval = 100; + std::atomic<bool> exit_thread = false; + + void tobii_error_signal_impl(QString error_message); + void tobii_ready_signal_impl(); +}; |