summaryrefslogtreecommitdiffhomepage
path: root/tracker-test/test.h
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-06-12 16:58:28 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-06-14 18:14:46 +0200
commit251d2c45a37da6fed01c1f37529c3cd899b434e6 (patch)
tree4a325cde6a3bba1557bc8384384f295ac74e3259 /tracker-test/test.h
parentaa635343aa5f4a84b9491ad8fb008bf17544a3fe (diff)
tracker/test: sine wave test tracker
Diffstat (limited to 'tracker-test/test.h')
-rw-r--r--tracker-test/test.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/tracker-test/test.h b/tracker-test/test.h
new file mode 100644
index 00000000..500b28f4
--- /dev/null
+++ b/tracker-test/test.h
@@ -0,0 +1,44 @@
+#pragma once
+#include "ui_test.h"
+#include "opentrack/plugin-api.hpp"
+#include "opentrack-compat/timer.hpp"
+
+class FTNoIR_Tracker : public ITracker
+{
+public:
+ FTNoIR_Tracker();
+ ~FTNoIR_Tracker() override;
+ void start_tracker(QFrame *) override;
+ void data(double *data) override;
+
+private:
+ static constexpr double pi = 3.14159265358979323846;
+ static constexpr double r2d = 180 / pi;
+ static constexpr double d2r = pi / 180;
+
+ static const double incr[6];
+ double last_x[6];
+ Timer t;
+};
+
+class TrackerControls: public ITrackerDialog
+{
+ Q_OBJECT
+
+ Ui::test_ui ui;
+public:
+ TrackerControls();
+ void register_tracker(ITracker *) override {}
+ void unregister_tracker() override {}
+private slots:
+ void doOK();
+ void doCancel();
+};
+
+class FTNoIR_TrackerDll : public Metadata
+{
+public:
+ QString name() { return QString("Testing - sine wave"); }
+ QIcon icon() { return QIcon(":/images/facetracknoir.png"); }
+};
+