diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2015-10-29 07:25:52 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2015-10-29 07:25:52 +0100 |
commit | b0fbe9605b47437d06694a747e607a1b9558c8b3 (patch) | |
tree | 12fdbdaf341b93f493c50280f94a89fde8ec5f92 | |
parent | ee5a2b5cd1e93a2133697445aa68f40539c902e2 (diff) |
rift: finish 0.2.5 support
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | ftnoir_tracker_rift/ftnoir_tracker_rift.h | 2 | ||||
-rw-r--r-- | ftnoir_tracker_rift_025/ftnoir_rift_025.qrc (renamed from ftnoir_tracker_rift_025/ftnoir_rift.qrc) | 0 | ||||
-rw-r--r-- | ftnoir_tracker_rift_025/ftnoir_rift_clientcontrols_025.ui (renamed from ftnoir_tracker_rift_025/ftnoir_rift_clientcontrols.ui) | 0 | ||||
-rw-r--r-- | ftnoir_tracker_rift_025/ftnoir_tracker_rift_025.cpp (renamed from ftnoir_tracker_rift_025/ftnoir_tracker_rift.cpp) | 20 | ||||
-rw-r--r-- | ftnoir_tracker_rift_025/ftnoir_tracker_rift_025.h (renamed from ftnoir_tracker_rift_025/ftnoir_tracker_rift.h) | 11 | ||||
-rw-r--r-- | ftnoir_tracker_rift_025/ftnoir_tracker_rift_dialog_025.cpp (renamed from ftnoir_tracker_rift_025/ftnoir_tracker_rift_dialog.cpp) | 4 |
7 files changed, 16 insertions, 23 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 766d23cb..e447c4b8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -438,7 +438,7 @@ if(SDK_RIFT_025) set(c-flags "-fno-strict-aliasing") endif() endif() - opentrack_library(opentrack-tracker-rift-025 ftnoir_tracker_rift-025 LINK ${link-flags} COMPILE ${c-flags}) + opentrack_library(opentrack-tracker-rift-025 ftnoir_tracker_rift_025 LINK ${link-flags} COMPILE ${c-flags}) target_include_directories(opentrack-tracker-rift-025 SYSTEM PUBLIC ${SDK_RIFT_025}/Include ${SDK_RIFT_025}/Src) if(WIN32) if(MSVC) diff --git a/ftnoir_tracker_rift/ftnoir_tracker_rift.h b/ftnoir_tracker_rift/ftnoir_tracker_rift.h index 231648dd..f4458413 100644 --- a/ftnoir_tracker_rift/ftnoir_tracker_rift.h +++ b/ftnoir_tracker_rift/ftnoir_tracker_rift.h @@ -54,7 +54,7 @@ private slots: class FTNoIR_TrackerDll : public Metadata { public: - QString name() { return QString("Oculus Rift -- HMD"); } + QString name() { return QString("Oculus Rift DK2 -- HMD"); } QIcon icon() { return QIcon(":/images/rift_tiny.png"); } }; diff --git a/ftnoir_tracker_rift_025/ftnoir_rift.qrc b/ftnoir_tracker_rift_025/ftnoir_rift_025.qrc index cd174fc4..cd174fc4 100644 --- a/ftnoir_tracker_rift_025/ftnoir_rift.qrc +++ b/ftnoir_tracker_rift_025/ftnoir_rift_025.qrc diff --git a/ftnoir_tracker_rift_025/ftnoir_rift_clientcontrols.ui b/ftnoir_tracker_rift_025/ftnoir_rift_clientcontrols_025.ui index 20c8f00b..20c8f00b 100644 --- a/ftnoir_tracker_rift_025/ftnoir_rift_clientcontrols.ui +++ b/ftnoir_tracker_rift_025/ftnoir_rift_clientcontrols_025.ui diff --git a/ftnoir_tracker_rift_025/ftnoir_tracker_rift.cpp b/ftnoir_tracker_rift_025/ftnoir_tracker_rift_025.cpp index 549b5ca2..75940697 100644 --- a/ftnoir_tracker_rift_025/ftnoir_tracker_rift.cpp +++ b/ftnoir_tracker_rift_025/ftnoir_tracker_rift_025.cpp @@ -1,6 +1,6 @@ /* Copyright: "i couldn't care less what anyone does with the 5 lines of code i wrote" - mm0zct */ -#include "ftnoir_tracker_rift.h" -#include "facetracknoir/global-settings.h" +#include "ftnoir_tracker_rift_025.h" +#include "opentrack/plugin-api.hpp" #include "OVR.h" #include <cstdio> @@ -8,7 +8,6 @@ using namespace OVR; Rift_Tracker::Rift_Tracker() { - should_quit = false; pManager = NULL; pSensor = NULL; pSFusion = NULL; @@ -84,18 +83,9 @@ void Rift_Tracker::data(double *data) newHeadPose[Yaw] += s.constant_drift; old_yaw=yaw; } - if (s.bEnableYaw) - { - data[Yaw] = newHeadPose[Yaw] * 57.295781f; - } - if (s.bEnablePitch) - { - data[Pitch] = newHeadPose[Pitch] * 57.295781f; - } - if (s.bEnableRoll) - { - data[Roll] = newHeadPose[Roll] * 57.295781f; - } + data[Yaw] = newHeadPose[Yaw] * 57.295781f; + data[Pitch] = newHeadPose[Pitch] * 57.295781f; + data[Roll] = newHeadPose[Roll] * 57.295781f; } } diff --git a/ftnoir_tracker_rift_025/ftnoir_tracker_rift.h b/ftnoir_tracker_rift_025/ftnoir_tracker_rift_025.h index 231648dd..ca3068bc 100644 --- a/ftnoir_tracker_rift_025/ftnoir_tracker_rift.h +++ b/ftnoir_tracker_rift_025/ftnoir_tracker_rift_025.h @@ -1,5 +1,5 @@ #pragma once -#include "ui_ftnoir_rift_clientcontrols.h" +#include "ui_ftnoir_rift_clientcontrols_025.h" #include <QMessageBox> #include <QWaitCondition> #include <cmath> @@ -13,7 +13,7 @@ struct settings : opts { value<bool> useYawSpring; value<double> constant_drift, persistence, deadzone; settings() : - opts("Rift"), + opts("Rift-025"), useYawSpring(b, "yaw-spring", false), constant_drift(b, "constant-drift", 0.000005), persistence(b, "persistence", 0.99999), @@ -30,8 +30,11 @@ public: void data(double *data) override; private: double old_yaw; - ovrHmd hmd; settings s; + static bool isInitialised; + OVR::DeviceManager* pManager; + OVR::SensorDevice* pSensor; + OVR::SensorFusion* pSFusion; }; class TrackerControls: public ITrackerDialog @@ -54,7 +57,7 @@ private slots: class FTNoIR_TrackerDll : public Metadata { public: - QString name() { return QString("Oculus Rift -- HMD"); } + QString name() { return QString("Oculus Rift DK1 -- HMD"); } QIcon icon() { return QIcon(":/images/rift_tiny.png"); } }; diff --git a/ftnoir_tracker_rift_025/ftnoir_tracker_rift_dialog.cpp b/ftnoir_tracker_rift_025/ftnoir_tracker_rift_dialog_025.cpp index 6c8e9cd7..8100e362 100644 --- a/ftnoir_tracker_rift_025/ftnoir_tracker_rift_dialog.cpp +++ b/ftnoir_tracker_rift_025/ftnoir_tracker_rift_dialog_025.cpp @@ -1,4 +1,4 @@ -#include "ftnoir_tracker_rift.h" +#include "ftnoir_tracker_rift_025.h" #include "opentrack/plugin-api.hpp" TrackerControls::TrackerControls() @@ -16,7 +16,7 @@ TrackerControls::TrackerControls() void TrackerControls::doOK() { s.b->save(); - this->close(); + this->close(); } void TrackerControls::doCancel() { |