diff options
-rw-r--r-- | CMakeLists.txt | 84 | ||||
-rw-r--r-- | ftnoir_tracker_rift_025/ftnoir_tracker_rift_025.h | 2 | ||||
-rw-r--r-- | ftnoir_tracker_rift_042/ftnoir_rift_042.qrc (renamed from ftnoir_tracker_rift/ftnoir_rift.qrc) | 0 | ||||
-rw-r--r-- | ftnoir_tracker_rift_042/ftnoir_rift_clientcontrols_042.ui (renamed from ftnoir_tracker_rift/ftnoir_rift_clientcontrols.ui) | 0 | ||||
-rw-r--r-- | ftnoir_tracker_rift_042/ftnoir_tracker_rift_042.cpp (renamed from ftnoir_tracker_rift/ftnoir_tracker_rift.cpp) | 2 | ||||
-rw-r--r-- | ftnoir_tracker_rift_042/ftnoir_tracker_rift_042.h (renamed from ftnoir_tracker_rift/ftnoir_tracker_rift.h) | 6 | ||||
-rw-r--r-- | ftnoir_tracker_rift_042/ftnoir_tracker_rift_dialog_042.cpp (renamed from ftnoir_tracker_rift/ftnoir_tracker_rift_dialog.cpp) | 2 | ||||
-rw-r--r-- | ftnoir_tracker_rift_042/images/medium.png (renamed from ftnoir_tracker_rift/images/medium.png) | bin | 5764 -> 5764 bytes | |||
-rw-r--r-- | ftnoir_tracker_rift_042/images/rift_medium.png (renamed from ftnoir_tracker_rift/images/rift_medium.png) | bin | 5764 -> 5764 bytes | |||
-rw-r--r-- | ftnoir_tracker_rift_042/images/rift_small.png (renamed from ftnoir_tracker_rift/images/rift_small.png) | bin | 1212 -> 1212 bytes | |||
-rw-r--r-- | ftnoir_tracker_rift_042/images/rift_tiny.png (renamed from ftnoir_tracker_rift/images/rift_tiny.png) | bin | 624 -> 624 bytes | |||
-rw-r--r-- | ftnoir_tracker_rift_042/images/small.png (renamed from ftnoir_tracker_rift/images/small.png) | bin | 1212 -> 1212 bytes | |||
-rw-r--r-- | ftnoir_tracker_rift_042/images/tiny.png (renamed from ftnoir_tracker_rift/images/tiny.png) | bin | 624 -> 624 bytes | |||
-rw-r--r-- | ftnoir_tracker_rift_080/ftnoir_rift_080.qrc | 7 | ||||
-rw-r--r-- | ftnoir_tracker_rift_080/ftnoir_rift_clientcontrols_080.ui | 176 | ||||
-rw-r--r-- | ftnoir_tracker_rift_080/ftnoir_tracker_rift_080.cpp | 69 | ||||
-rw-r--r-- | ftnoir_tracker_rift_080/ftnoir_tracker_rift_080.h | 60 | ||||
-rw-r--r-- | ftnoir_tracker_rift_080/ftnoir_tracker_rift_dialog_080.cpp | 26 | ||||
-rw-r--r-- | ftnoir_tracker_rift_080/images/medium.png | bin | 0 -> 5764 bytes | |||
-rw-r--r-- | ftnoir_tracker_rift_080/images/rift_medium.png | bin | 0 -> 5764 bytes | |||
-rw-r--r-- | ftnoir_tracker_rift_080/images/rift_small.png | bin | 0 -> 1212 bytes | |||
-rw-r--r-- | ftnoir_tracker_rift_080/images/rift_tiny.png | bin | 0 -> 624 bytes | |||
-rw-r--r-- | ftnoir_tracker_rift_080/images/small.png | bin | 0 -> 1212 bytes | |||
-rw-r--r-- | ftnoir_tracker_rift_080/images/tiny.png | bin | 0 -> 624 bytes |
24 files changed, 373 insertions, 61 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index e447c4b8..a444bce3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -186,7 +186,8 @@ endif() SET(SDK_HYDRA "" CACHE PATH "libSixense path for Razer Hydra") SET(SDK_HYDRA_AMD64 FALSE CACHE BOOL "whether libSixense is amd64 (else ia-32)") -SET(SDK_RIFT "" CACHE PATH "libOVR path for Oculus Rift") +SET(SDK_RIFT_080 "" CACHE PATH "libOVR path for Oculus Rift") +SET(SDK_RIFT_042 "" CACHE PATH "libOVR path for Oculus Rift") SET(SDK_RIFT_025 "" CACHE PATH "libOVR 0.2.5 path for Oculus Rift") set(SDK_ARUCO_LIBPATH "" CACHE FILEPATH "Aruco paper marker tracker static library path") @@ -427,67 +428,40 @@ endif() link_with_dinput8(opentrack-tracker-joystick) -if(SDK_RIFT_025) - set(link-flags) - set(c-flags) - if(APPLE) - set(link-flags "-framework CoreFoundation -framework CoreGraphics -framework IOKit -framework Quartz") - set(c-flags "-fno-strict-aliasing") - else() - if(NOT MSVC) +foreach(ver 025 042 080) + if(SDK_RIFT_${ver}) + set(link-flags) + set(c-flags) + if(APPLE) + set(link-flags "-framework CoreFoundation -framework CoreGraphics -framework IOKit -framework Quartz") set(c-flags "-fno-strict-aliasing") - endif() - endif() - 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) - set(ext lib) - set(p) else() - set(ext a) - set(p lib) + if(NOT MSVC) + set(c-flags "-fno-strict-aliasing") endif() - target_link_libraries(opentrack-tracker-rift-025 ${SDK_RIFT_025}/${p}LibOVR.${ext} winmm setupapi ws2_32 imagehlp wbemuuid) - else() - if(NOT APPLE) - target_link_libraries(opentrack-tracker-rift-025 ${SDK_RIFT_025}/libLibOVR.a udev Xinerama) - else() - target_link_libraries(opentrack-tracker-rift-025 ${SDK_RIFT_025}/libLibOVR.a) endif() - endif() -endif() - -if(SDK_RIFT) - set(link-flags) - set(c-flags) - if(APPLE) - set(link-flags "-framework CoreFoundation -framework CoreGraphics -framework IOKit -framework Quartz") - set(c-flags "-fno-strict-aliasing") - else() - if(NOT MSVC) - set(c-flags "-fno-strict-aliasing") - endif() - endif() - opentrack_library(opentrack-tracker-rift ftnoir_tracker_rift LINK ${link-flags} COMPILE ${c-flags}) - target_include_directories(opentrack-tracker-rift SYSTEM PUBLIC ${SDK_RIFT}/Include ${SDK_RIFT}/Src) - if(WIN32) - if(MSVC) - set(ext lib) - set(p) - else() - set(ext a) - set(p lib) - endif() - target_link_libraries(opentrack-tracker-rift ${SDK_RIFT}/${p}LibOVR.${ext} winmm setupapi ws2_32 imagehlp wbemuuid) - else() - if(NOT APPLE) - target_link_libraries(opentrack-tracker-rift ${SDK_RIFT}/libLibOVR.a udev Xinerama) + opentrack_library(opentrack-tracker-rift-${ver} ftnoir_tracker_rift_${ver} LINK ${link-flags} COMPILE ${c-flags}) + target_include_directories(opentrack-tracker-rift-${ver} SYSTEM PUBLIC + ${SDK_RIFT_${ver}}/Include ${SDK_RIFT_${ver}}/Src + ) + if(WIN32) + if(MSVC) + set(ext lib) + set(p) + else() + set(ext a) + set(p lib) + endif() + target_link_libraries(opentrack-tracker-rift-${ver} ${SDK_RIFT_${ver}}/${p}LibOVR.${ext} winmm setupapi ws2_32 imagehlp wbemuuid) else() - target_link_libraries(opentrack-tracker-rift ${SDK_RIFT}/libLibOVR.a) + if(NOT APPLE) + target_link_libraries(opentrack-tracker-rift-${ver} ${SDK_RIFT_${ver}}/libLibOVR.a udev Xinerama) + else() + target_link_libraries(opentrack-tracker-rift-${ver} ${SDK_RIFT_${ver}}/libLibOVR.a) + endif() endif() endif() -endif() +endforeach() if(SDK_HYDRA) opentrack_library(opentrack-tracker-hydra ftnoir_tracker_hydra) diff --git a/ftnoir_tracker_rift_025/ftnoir_tracker_rift_025.h b/ftnoir_tracker_rift_025/ftnoir_tracker_rift_025.h index ca3068bc..717cbe84 100644 --- a/ftnoir_tracker_rift_025/ftnoir_tracker_rift_025.h +++ b/ftnoir_tracker_rift_025/ftnoir_tracker_rift_025.h @@ -25,7 +25,7 @@ class Rift_Tracker : public ITracker { public: Rift_Tracker(); - ~Rift_Tracker() override; + virtual ~Rift_Tracker() override; void start_tracker(QFrame *) override; void data(double *data) override; private: diff --git a/ftnoir_tracker_rift/ftnoir_rift.qrc b/ftnoir_tracker_rift_042/ftnoir_rift_042.qrc index cd174fc4..cd174fc4 100644 --- a/ftnoir_tracker_rift/ftnoir_rift.qrc +++ b/ftnoir_tracker_rift_042/ftnoir_rift_042.qrc diff --git a/ftnoir_tracker_rift/ftnoir_rift_clientcontrols.ui b/ftnoir_tracker_rift_042/ftnoir_rift_clientcontrols_042.ui index 20c8f00b..20c8f00b 100644 --- a/ftnoir_tracker_rift/ftnoir_rift_clientcontrols.ui +++ b/ftnoir_tracker_rift_042/ftnoir_rift_clientcontrols_042.ui diff --git a/ftnoir_tracker_rift/ftnoir_tracker_rift.cpp b/ftnoir_tracker_rift_042/ftnoir_tracker_rift_042.cpp index 74208272..655a014c 100644 --- a/ftnoir_tracker_rift/ftnoir_tracker_rift.cpp +++ b/ftnoir_tracker_rift_042/ftnoir_tracker_rift_042.cpp @@ -1,5 +1,5 @@ /* Copyright: "i couldn't care less what anyone does with the 5 lines of code i wrote" - mm0zct */ -#include "ftnoir_tracker_rift.h" +#include "ftnoir_tracker_rift_042.h" #include "opentrack/plugin-api.hpp" #include "OVR_CAPI.h" #include "Kernel/OVR_Math.h" diff --git a/ftnoir_tracker_rift/ftnoir_tracker_rift.h b/ftnoir_tracker_rift_042/ftnoir_tracker_rift_042.h index f4458413..437a2a39 100644 --- a/ftnoir_tracker_rift/ftnoir_tracker_rift.h +++ b/ftnoir_tracker_rift_042/ftnoir_tracker_rift_042.h @@ -1,5 +1,5 @@ #pragma once -#include "ui_ftnoir_rift_clientcontrols.h" +#include "ui_ftnoir_rift_clientcontrols_042.h" #include <QMessageBox> #include <QWaitCondition> #include <cmath> @@ -25,7 +25,7 @@ class Rift_Tracker : public ITracker { public: Rift_Tracker(); - ~Rift_Tracker() override; + virtual ~Rift_Tracker() override; void start_tracker(QFrame *) override; void data(double *data) override; private: @@ -54,7 +54,7 @@ private slots: class FTNoIR_TrackerDll : public Metadata { public: - QString name() { return QString("Oculus Rift DK2 -- HMD"); } + QString name() { return QString("Oculus Rift runtime 0.4.2 -- HMD"); } QIcon icon() { return QIcon(":/images/rift_tiny.png"); } }; diff --git a/ftnoir_tracker_rift/ftnoir_tracker_rift_dialog.cpp b/ftnoir_tracker_rift_042/ftnoir_tracker_rift_dialog_042.cpp index 6c8e9cd7..9a8b7549 100644 --- a/ftnoir_tracker_rift/ftnoir_tracker_rift_dialog.cpp +++ b/ftnoir_tracker_rift_042/ftnoir_tracker_rift_dialog_042.cpp @@ -1,4 +1,4 @@ -#include "ftnoir_tracker_rift.h" +#include "ftnoir_tracker_rift_042.h" #include "opentrack/plugin-api.hpp" TrackerControls::TrackerControls() diff --git a/ftnoir_tracker_rift/images/medium.png b/ftnoir_tracker_rift_042/images/medium.png Binary files differindex a5ba49e7..a5ba49e7 100644 --- a/ftnoir_tracker_rift/images/medium.png +++ b/ftnoir_tracker_rift_042/images/medium.png diff --git a/ftnoir_tracker_rift/images/rift_medium.png b/ftnoir_tracker_rift_042/images/rift_medium.png Binary files differindex a5ba49e7..a5ba49e7 100644 --- a/ftnoir_tracker_rift/images/rift_medium.png +++ b/ftnoir_tracker_rift_042/images/rift_medium.png diff --git a/ftnoir_tracker_rift/images/rift_small.png b/ftnoir_tracker_rift_042/images/rift_small.png Binary files differindex 3f18080c..3f18080c 100644 --- a/ftnoir_tracker_rift/images/rift_small.png +++ b/ftnoir_tracker_rift_042/images/rift_small.png diff --git a/ftnoir_tracker_rift/images/rift_tiny.png b/ftnoir_tracker_rift_042/images/rift_tiny.png Binary files differindex 76fe0f58..76fe0f58 100644 --- a/ftnoir_tracker_rift/images/rift_tiny.png +++ b/ftnoir_tracker_rift_042/images/rift_tiny.png diff --git a/ftnoir_tracker_rift/images/small.png b/ftnoir_tracker_rift_042/images/small.png Binary files differindex 3f18080c..3f18080c 100644 --- a/ftnoir_tracker_rift/images/small.png +++ b/ftnoir_tracker_rift_042/images/small.png diff --git a/ftnoir_tracker_rift/images/tiny.png b/ftnoir_tracker_rift_042/images/tiny.png Binary files differindex 76fe0f58..76fe0f58 100644 --- a/ftnoir_tracker_rift/images/tiny.png +++ b/ftnoir_tracker_rift_042/images/tiny.png diff --git a/ftnoir_tracker_rift_080/ftnoir_rift_080.qrc b/ftnoir_tracker_rift_080/ftnoir_rift_080.qrc new file mode 100644 index 00000000..cd174fc4 --- /dev/null +++ b/ftnoir_tracker_rift_080/ftnoir_rift_080.qrc @@ -0,0 +1,7 @@ +<RCC> + <qresource prefix="/"> + <file>images/rift_medium.png</file> + <file>images/rift_small.png</file> + <file>images/rift_tiny.png</file> + </qresource> +</RCC> diff --git a/ftnoir_tracker_rift_080/ftnoir_rift_clientcontrols_080.ui b/ftnoir_tracker_rift_080/ftnoir_rift_clientcontrols_080.ui new file mode 100644 index 00000000..20c8f00b --- /dev/null +++ b/ftnoir_tracker_rift_080/ftnoir_rift_clientcontrols_080.ui @@ -0,0 +1,176 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>UIRiftControls</class> + <widget class="QWidget" name="UIRiftControls"> + <property name="windowModality"> + <enum>Qt::NonModal</enum> + </property> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>218</width> + <height>200</height> + </rect> + </property> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="windowTitle"> + <string>Oculus Rift tracker settings FaceTrackNoIR</string> + </property> + <property name="windowIcon"> + <iconset> + <normaloff>images/FaceTrackNoIR.png</normaloff>images/FaceTrackNoIR.png</iconset> + </property> + <property name="layoutDirection"> + <enum>Qt::LeftToRight</enum> + </property> + <property name="autoFillBackground"> + <bool>false</bool> + </property> + <layout class="QGridLayout" name="gridLayout_2"> + <item row="0" column="0"> + <widget class="QGroupBox" name="groupBox"> + <property name="title"> + <string>Yaw spring</string> + </property> + <layout class="QGridLayout" name="gridLayout"> + <item row="0" column="0"> + <widget class="QCheckBox" name="yawSpring"> + <property name="text"> + <string>Enable</string> + </property> + </widget> + </item> + <item row="1" column="0"> + <widget class="QLabel" name="label"> + <property name="text"> + <string>Persistence</string> + </property> + </widget> + </item> + <item row="1" column="1"> + <widget class="QDoubleSpinBox" name="persistence"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>23</height> + </size> + </property> + <property name="decimals"> + <number>5</number> + </property> + <property name="minimum"> + <double>0.900000000000000</double> + </property> + <property name="maximum"> + <double>1.000000000000000</double> + </property> + <property name="singleStep"> + <double>0.001000000000000</double> + </property> + </widget> + </item> + <item row="2" column="0"> + <widget class="QLabel" name="label_2"> + <property name="text"> + <string>Constant drift</string> + </property> + </widget> + </item> + <item row="2" column="1"> + <widget class="QDoubleSpinBox" name="constantDrift"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>23</height> + </size> + </property> + <property name="decimals"> + <number>5</number> + </property> + <property name="minimum"> + <double>0.000100000000000</double> + </property> + <property name="maximum"> + <double>0.100000000000000</double> + </property> + <property name="singleStep"> + <double>0.001000000000000</double> + </property> + </widget> + </item> + <item row="3" column="0"> + <widget class="QLabel" name="label_3"> + <property name="text"> + <string>Deadzone</string> + </property> + </widget> + </item> + <item row="3" column="1"> + <widget class="QDoubleSpinBox" name="deadzone"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>23</height> + </size> + </property> + <property name="decimals"> + <number>5</number> + </property> + <property name="maximum"> + <double>0.100000000000000</double> + </property> + <property name="singleStep"> + <double>0.010000000000000</double> + </property> + </widget> + </item> + </layout> + </widget> + </item> + <item row="1" column="0"> + <widget class="QDialogButtonBox" name="buttonBox"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="standardButtons"> + <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> + </property> + </widget> + </item> + </layout> + </widget> + <resources/> + <connections/> + <slots> + <slot>startEngineClicked()</slot> + <slot>stopEngineClicked()</slot> + <slot>cameraSettingsClicked()</slot> + </slots> +</ui> diff --git a/ftnoir_tracker_rift_080/ftnoir_tracker_rift_080.cpp b/ftnoir_tracker_rift_080/ftnoir_tracker_rift_080.cpp new file mode 100644 index 00000000..4907f891 --- /dev/null +++ b/ftnoir_tracker_rift_080/ftnoir_tracker_rift_080.cpp @@ -0,0 +1,69 @@ +/* Copyright: "i couldn't care less what anyone does with the 5 lines of code i wrote" - mm0zct */ +#include "ftnoir_tracker_rift_080.h" +#include "opentrack/plugin-api.hpp" +#include "OVR_CAPI.h" +#include "Extras/OVR_Math.h" +#include "OVR_CAPI_0_8_0.h" +#include <cstdio> + +using namespace OVR; + +Rift_Tracker::Rift_Tracker() : old_yaw(0), hmd(nullptr) +{ +} + +Rift_Tracker::~Rift_Tracker() +{ + if (hmd) + ovr_Destroy(hmd); + ovr_Shutdown(); +} + +void Rift_Tracker::start_tracker(QFrame*) +{ + ovrGraphicsLuid luid; + ovrResult result = ovr_Create(&hmd, &luid); + if (OVR_SUCCESS(result)) + { + ovr_ConfigureTracking(hmd, ovrTrackingCap_Orientation | ovrTrackingCap_MagYawCorrection | ovrTrackingCap_Position, ovrTrackingCap_Orientation); + } + else + { + // XXX need change ITracker et al api to allow for failure reporting + // this qmessagebox doesn't give any relevant details either -sh 20141012 + QMessageBox::warning(0,"FaceTrackNoIR Error", "Unable to start Rift tracker",QMessageBox::Ok,QMessageBox::NoButton); + } +} + +void Rift_Tracker::data(double *data) +{ + if (hmd) + { + ovrTrackingState ss = ovr_GetTrackingState(hmd, 0, false); + if(ss.StatusFlags & ovrStatus_OrientationTracked) { + auto pose = ss.HeadPose.ThePose; + Quatf quat = pose.Orientation; + float yaw, pitch, roll; + quat.GetEulerAngles<Axis_Y, Axis_X, Axis_Z>(&yaw, &pitch, &roll); + // XXX TODO move to core + if (s.useYawSpring) + { + yaw = old_yaw*s.persistence + (yaw-old_yaw); + if(yaw > s.deadzone) + yaw -= s.constant_drift; + if(yaw < -s.deadzone) + yaw += s.constant_drift; + old_yaw=yaw; + } + constexpr double d2r = 57.295781; + data[Yaw] = yaw * -d2r; + data[Pitch] = pitch * d2r; + data[Roll] = roll * d2r; + data[TX] = pose.Position.x * -1e2; + data[TY] = pose.Position.y * 1e2; + data[TZ] = pose.Position.z * 1e2; + } + } +} + +OPENTRACK_DECLARE_TRACKER(Rift_Tracker, TrackerControls, FTNoIR_TrackerDll) diff --git a/ftnoir_tracker_rift_080/ftnoir_tracker_rift_080.h b/ftnoir_tracker_rift_080/ftnoir_tracker_rift_080.h new file mode 100644 index 00000000..7ba191e1 --- /dev/null +++ b/ftnoir_tracker_rift_080/ftnoir_tracker_rift_080.h @@ -0,0 +1,60 @@ +#pragma once +#include "ui_ftnoir_rift_clientcontrols_080.h" +#include <QMessageBox> +#include <QWaitCondition> +#include <cmath> +#include "opentrack/plugin-api.hpp" +#include "OVR.h" +#include <memory> +#include "opentrack/options.hpp" +using namespace options; + +struct settings : opts { + value<bool> useYawSpring; + value<double> constant_drift, persistence, deadzone; + settings() : + opts("Rift"), + useYawSpring(b, "yaw-spring", false), + constant_drift(b, "constant-drift", 0.000005), + persistence(b, "persistence", 0.99999), + deadzone(b, "deadzone", 0.02) + {} +}; + +class Rift_Tracker : public ITracker +{ +public: + Rift_Tracker(); + virtual ~Rift_Tracker() override; + void start_tracker(QFrame *) override; + void data(double *data) override; +private: + double old_yaw; + ovrSession hmd; + settings s; +}; + +class TrackerControls: public ITrackerDialog +{ + Q_OBJECT +public: + TrackerControls(); + + void register_tracker(ITracker *) {} + void unregister_tracker() {} + +private: + Ui::UIRiftControls ui; + settings s; +private slots: + void doOK(); + void doCancel(); +}; + +class FTNoIR_TrackerDll : public Metadata +{ +public: + QString name() { return QString("Oculus Rift runtime 0.8.0 -- HMD"); } + QIcon icon() { return QIcon(":/images/rift_tiny.png"); } +}; + diff --git a/ftnoir_tracker_rift_080/ftnoir_tracker_rift_dialog_080.cpp b/ftnoir_tracker_rift_080/ftnoir_tracker_rift_dialog_080.cpp new file mode 100644 index 00000000..0bf797be --- /dev/null +++ b/ftnoir_tracker_rift_080/ftnoir_tracker_rift_dialog_080.cpp @@ -0,0 +1,26 @@ +#include "ftnoir_tracker_rift_080.h" +#include "opentrack/plugin-api.hpp" + +TrackerControls::TrackerControls() +{ + ui.setupUi( this ); + + connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(doOK())); + connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(doCancel())); + + tie_setting(s.constant_drift, ui.constantDrift); + tie_setting(s.deadzone, ui.deadzone); + tie_setting(s.persistence, ui.persistence); + tie_setting(s.useYawSpring, ui.yawSpring); +} + +void TrackerControls::doOK() { + s.b->save(); + this->close(); +} + +void TrackerControls::doCancel() { + s.b->reload(); + close(); +} + diff --git a/ftnoir_tracker_rift_080/images/medium.png b/ftnoir_tracker_rift_080/images/medium.png Binary files differnew file mode 100644 index 00000000..a5ba49e7 --- /dev/null +++ b/ftnoir_tracker_rift_080/images/medium.png diff --git a/ftnoir_tracker_rift_080/images/rift_medium.png b/ftnoir_tracker_rift_080/images/rift_medium.png Binary files differnew file mode 100644 index 00000000..a5ba49e7 --- /dev/null +++ b/ftnoir_tracker_rift_080/images/rift_medium.png diff --git a/ftnoir_tracker_rift_080/images/rift_small.png b/ftnoir_tracker_rift_080/images/rift_small.png Binary files differnew file mode 100644 index 00000000..3f18080c --- /dev/null +++ b/ftnoir_tracker_rift_080/images/rift_small.png diff --git a/ftnoir_tracker_rift_080/images/rift_tiny.png b/ftnoir_tracker_rift_080/images/rift_tiny.png Binary files differnew file mode 100644 index 00000000..76fe0f58 --- /dev/null +++ b/ftnoir_tracker_rift_080/images/rift_tiny.png diff --git a/ftnoir_tracker_rift_080/images/small.png b/ftnoir_tracker_rift_080/images/small.png Binary files differnew file mode 100644 index 00000000..3f18080c --- /dev/null +++ b/ftnoir_tracker_rift_080/images/small.png diff --git a/ftnoir_tracker_rift_080/images/tiny.png b/ftnoir_tracker_rift_080/images/tiny.png Binary files differnew file mode 100644 index 00000000..76fe0f58 --- /dev/null +++ b/ftnoir_tracker_rift_080/images/tiny.png |