summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2014-09-22 11:39:07 +0200
committerStanislaw Halik <sthalik@misaki.pl>2014-09-22 11:39:07 +0200
commitfb0cd9401e26aaf610356ffe899af268012d18c3 (patch)
treed8dde935c2dc989ffa7612d74ace482f8c4e50d1
parent461cb6e8f2b141a2408a4caf1fab930c24b19516 (diff)
remove obsolete axis selector from trackers
-rw-r--r--ftnoir_tracker_aruco/aruco-trackercontrols.ui449
-rw-r--r--ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp24
-rw-r--r--ftnoir_tracker_aruco/ftnoir_tracker_aruco.h7
-rw-r--r--ftnoir_tracker_freepie-udp/freepie-udp-controls.ui159
-rw-r--r--ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp.cpp9
-rw-r--r--ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp.h6
-rw-r--r--ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp_dialog.cpp3
-rw-r--r--ftnoir_tracker_ht/ftnoir_tracker_ht.cpp26
-rw-r--r--ftnoir_tracker_ht/ftnoir_tracker_ht.h7
-rw-r--r--ftnoir_tracker_ht/ht-trackercontrols.ui91
-rw-r--r--ftnoir_tracker_hydra/ftnoir_hydra_clientcontrols.ui168
-rw-r--r--ftnoir_tracker_hydra/ftnoir_tracker_hydra.cpp43
-rw-r--r--ftnoir_tracker_hydra/ftnoir_tracker_hydra.h15
-rw-r--r--ftnoir_tracker_hydra/ftnoir_tracker_hydra_dialog.cpp7
-rw-r--r--ftnoir_tracker_pt/FTNoIR_PT_Controls.ui245
-rw-r--r--ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.cpp7
-rw-r--r--ftnoir_tracker_pt/ftnoir_tracker_pt_settings.h9
-rw-r--r--ftnoir_tracker_rift/ftnoir_rift_clientcontrols.ui200
-rw-r--r--ftnoir_tracker_rift/ftnoir_tracker_rift.cpp19
-rw-r--r--ftnoir_tracker_rift/ftnoir_tracker_rift.h8
-rw-r--r--ftnoir_tracker_rift/ftnoir_tracker_rift_dialog.cpp8
-rw-r--r--ftnoir_tracker_udp/ftnoir_ftnclientcontrols.ui358
-rw-r--r--ftnoir_tracker_udp/ftnoir_tracker_udp.cpp14
-rw-r--r--ftnoir_tracker_udp/ftnoir_tracker_udp.h10
-rw-r--r--ftnoir_tracker_udp/ftnoir_tracker_udp_dialog.cpp10
25 files changed, 281 insertions, 1621 deletions
diff --git a/ftnoir_tracker_aruco/aruco-trackercontrols.ui b/ftnoir_tracker_aruco/aruco-trackercontrols.ui
index be237e3c..e5654bd5 100644
--- a/ftnoir_tracker_aruco/aruco-trackercontrols.ui
+++ b/ftnoir_tracker_aruco/aruco-trackercontrols.ui
@@ -10,7 +10,7 @@
<x>0</x>
<y>0</y>
<width>636</width>
- <height>346</height>
+ <height>368</height>
</rect>
</property>
<property name="sizePolicy">
@@ -19,243 +19,239 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="maximumSize">
- <size>
- <width>6666</width>
- <height>6666</height>
- </size>
- </property>
<property name="windowTitle">
- <string>HT tracker settings</string>
+ <string>Tracker settings</string>
</property>
- <layout class="QGridLayout" name="gridLayout">
- <property name="spacing">
- <number>7</number>
- </property>
- <item row="9" column="1" rowspan="3">
- <widget class="QGroupBox" name="groupBox_2">
+ <layout class="QGridLayout" name="gridLayout_3">
+ <item row="0" column="0" rowspan="2" colspan="2">
+ <widget class="QGroupBox" name="groupBox">
<property name="title">
- <string>Head position</string>
+ <string/>
</property>
- <property name="alignment">
- <set>Qt::AlignCenter</set>
+ <property name="flat">
+ <bool>true</bool>
</property>
- <layout class="QGridLayout" name="gridLayout_2">
- <item row="2" column="0">
- <widget class="QLabel" name="label_7">
- <property name="text">
- <string>TY</string>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="label_5">
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="0" column="0">
+ <widget class="QLabel" name="label">
<property name="text">
- <string>TX</string>
+ <string>Horizontal FOV</string>
</property>
</widget>
</item>
- <item row="1" column="1">
- <widget class="QDoubleSpinBox" name="cx">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
+ <item row="0" column="1">
+ <widget class="QDoubleSpinBox" name="cameraFOV">
+ <property name="locale">
+ <locale language="English" country="UnitedStates"/>
</property>
<property name="minimum">
- <double>-10000.000000000000000</double>
+ <double>35.000000000000000</double>
</property>
<property name="maximum">
- <double>10000.000000000000000</double>
+ <double>180.000000000000000</double>
+ </property>
+ <property name="value">
+ <double>52.000000000000000</double>
</property>
</widget>
</item>
- <item row="3" column="0">
- <widget class="QLabel" name="label_8">
+ <item row="1" column="0">
+ <widget class="QLabel" name="label_2">
<property name="text">
- <string>TZ</string>
+ <string>Frames per second</string>
</property>
</widget>
</item>
- <item row="3" column="1">
- <widget class="QDoubleSpinBox" name="cz">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimum">
- <double>-10000.000000000000000</double>
- </property>
- <property name="maximum">
- <double>10000.000000000000000</double>
- </property>
+ <item row="1" column="1">
+ <widget class="QComboBox" name="cameraFPS">
+ <item>
+ <property name="text">
+ <string notr="true">Default</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>30</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>60</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>120</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>180</string>
+ </property>
+ </item>
</widget>
</item>
- <item row="2" column="1">
- <widget class="QDoubleSpinBox" name="cy">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimum">
- <double>-10000.000000000000000</double>
- </property>
- <property name="maximum">
- <double>10000.000000000000000</double>
+ <item row="2" column="0">
+ <widget class="QLabel" name="label_3">
+ <property name="text">
+ <string>Camera name</string>
</property>
</widget>
</item>
- <item row="4" column="1">
- <widget class="QPushButton" name="btn_calibrate">
+ <item row="2" column="1">
+ <widget class="QComboBox" name="cameraName"/>
+ </item>
+ <item row="3" column="0">
+ <widget class="QLabel" name="label_4">
<property name="text">
- <string>Calibrate</string>
+ <string>Resolution</string>
</property>
</widget>
</item>
- </layout>
- </widget>
- </item>
- <item row="0" column="3" rowspan="3" colspan="2">
- <widget class="QGroupBox" name="groupBox">
- <property name="title">
- <string>Enable axes</string>
- </property>
- <layout class="QFormLayout" name="formLayout">
- <property name="horizontalSpacing">
- <number>7</number>
- </property>
- <property name="leftMargin">
- <number>6</number>
- </property>
- <property name="topMargin">
- <number>0</number>
- </property>
- <property name="rightMargin">
- <number>6</number>
- </property>
- <property name="bottomMargin">
- <number>0</number>
- </property>
- <item row="0" column="0">
- <widget class="QCheckBox" name="rx">
- <property name="text">
- <string>RX</string>
- </property>
+ <item row="3" column="1">
+ <widget class="QComboBox" name="resolution">
+ <item>
+ <property name="text">
+ <string>640x480</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>320x240</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>320x200</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Default (not recommended!)</string>
+ </property>
+ </item>
</widget>
</item>
- <item row="0" column="1">
- <widget class="QCheckBox" name="tx">
+ <item row="4" column="0">
+ <widget class="QLabel" name="label_10">
<property name="text">
- <string>TX</string>
+ <string>Red channel only</string>
</property>
</widget>
</item>
- <item row="1" column="0">
- <widget class="QCheckBox" name="ry">
+ <item row="4" column="1">
+ <widget class="QCheckBox" name="red_only">
<property name="text">
- <string>RY</string>
+ <string>Mileage may vary</string>
</property>
</widget>
</item>
- <item row="1" column="1">
- <widget class="QCheckBox" name="ty">
+ <item row="5" column="0">
+ <widget class="QLabel" name="label_9">
<property name="text">
- <string>TY</string>
+ <string>Marker pitch</string>
</property>
</widget>
</item>
- <item row="2" column="0">
- <widget class="QCheckBox" name="rz">
- <property name="text">
- <string>RZ</string>
+ <item row="5" column="1">
+ <widget class="QDoubleSpinBox" name="marker_pitch">
+ <property name="minimum">
+ <double>-180.000000000000000</double>
+ </property>
+ <property name="maximum">
+ <double>180.000000000000000</double>
</property>
</widget>
</item>
- <item row="2" column="1">
- <widget class="QCheckBox" name="tz">
- <property name="text">
- <string>TZ</string>
+ <item row="6" column="1">
+ <widget class="QGroupBox" name="groupBox_2">
+ <property name="title">
+ <string>Head center</string>
</property>
+ <layout class="QGridLayout" name="gridLayout_2">
+ <item row="4" column="1">
+ <widget class="QPushButton" name="btn_calibrate">
+ <property name="text">
+ <string>Calibrate</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="label_5">
+ <property name="text">
+ <string>TX</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="QDoubleSpinBox" name="cy">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimum">
+ <double>-10000.000000000000000</double>
+ </property>
+ <property name="maximum">
+ <double>10000.000000000000000</double>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QDoubleSpinBox" name="cx">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimum">
+ <double>-10000.000000000000000</double>
+ </property>
+ <property name="maximum">
+ <double>10000.000000000000000</double>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1">
+ <widget class="QDoubleSpinBox" name="cz">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimum">
+ <double>-10000.000000000000000</double>
+ </property>
+ <property name="maximum">
+ <double>10000.000000000000000</double>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0">
+ <widget class="QLabel" name="label_8">
+ <property name="text">
+ <string>TZ</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <widget class="QLabel" name="label_7">
+ <property name="text">
+ <string>TY</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
</widget>
</item>
</layout>
</widget>
</item>
- <item row="1" column="0">
- <widget class="QLabel" name="label_2">
- <property name="text">
- <string>Frames per second</string>
- </property>
- </widget>
- </item>
- <item row="2" column="1" colspan="2">
- <widget class="QComboBox" name="cameraName"/>
- </item>
- <item row="1" column="1" colspan="2">
- <widget class="QComboBox" name="cameraFPS">
- <item>
- <property name="text">
- <string notr="true">Default</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>30</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>60</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>120</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>180</string>
- </property>
- </item>
- </widget>
- </item>
- <item row="7" column="1">
- <widget class="QCheckBox" name="red_only">
- <property name="text">
- <string>Recommended!</string>
- </property>
- </widget>
- </item>
- <item row="2" column="0">
- <widget class="QLabel" name="label_3">
- <property name="text">
- <string>Camera name</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1" colspan="2">
- <widget class="QDoubleSpinBox" name="cameraFOV">
- <property name="locale">
- <locale language="English" country="UnitedStates"/>
- </property>
- <property name="minimum">
- <double>35.000000000000000</double>
- </property>
- <property name="maximum">
- <double>180.000000000000000</double>
- </property>
- <property name="value">
- <double>52.000000000000000</double>
- </property>
- </widget>
- </item>
- <item row="6" column="2" rowspan="5" colspan="3">
+ <item row="0" column="2">
<widget class="QLabel" name="label_6">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
@@ -270,7 +266,7 @@
<enum>Qt::RichText</enum>
</property>
<property name="alignment">
- <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
@@ -286,93 +282,16 @@
</property>
</widget>
</item>
- <item row="7" column="0">
- <widget class="QLabel" name="label_10">
- <property name="text">
- <string>Red channel only</string>
- </property>
- </widget>
- </item>
- <item row="6" column="1">
- <widget class="QComboBox" name="resolution">
- <item>
- <property name="text">
- <string>640x480</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>320x240</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>320x200</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Default (not recommended!)</string>
- </property>
- </item>
- </widget>
- </item>
- <item row="0" column="0">
- <widget class="QLabel" name="label">
- <property name="text">
- <string>Horizontal FOV</string>
- </property>
- </widget>
- </item>
- <item row="11" column="4">
+ <item row="1" column="2">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
- <item row="8" column="1">
- <widget class="QDoubleSpinBox" name="marker_pitch">
- <property name="minimum">
- <double>-180.000000000000000</double>
- </property>
- <property name="maximum">
- <double>180.000000000000000</double>
- </property>
- </widget>
- </item>
- <item row="6" column="0">
- <widget class="QLabel" name="label_4">
- <property name="text">
- <string>Resolution</string>
- </property>
- </widget>
- </item>
- <item row="8" column="0">
- <widget class="QLabel" name="label_9">
- <property name="text">
- <string>Marker pitch</string>
- </property>
- </widget>
- </item>
</layout>
</widget>
<tabstops>
- <tabstop>cameraFOV</tabstop>
- <tabstop>cameraFPS</tabstop>
- <tabstop>cameraName</tabstop>
- <tabstop>resolution</tabstop>
- <tabstop>red_only</tabstop>
- <tabstop>marker_pitch</tabstop>
- <tabstop>cx</tabstop>
- <tabstop>cy</tabstop>
- <tabstop>cz</tabstop>
- <tabstop>rx</tabstop>
- <tabstop>ry</tabstop>
- <tabstop>rz</tabstop>
- <tabstop>tx</tabstop>
- <tabstop>ty</tabstop>
- <tabstop>tz</tabstop>
<tabstop>buttonBox</tabstop>
</tabstops>
<resources/>
diff --git a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp
index b70bef09..f469c7a4 100644
--- a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp
+++ b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp
@@ -380,18 +380,12 @@ void Tracker::GetHeadPoseData(double *data)
{
QMutexLocker lck(&mtx);
- if (s.eyaw)
- data[Yaw] = pose[Yaw];
- if (s.epitch)
- data[Pitch] = pose[Pitch];
- if (s.eroll)
- data[Roll] = pose[Roll];
- if (s.ex)
- data[TX] = pose[TX] * .1;
- if (s.ey)
- data[TY] = pose[TY] * .1;
- if (s.ez)
- data[TZ] = pose[TZ] * .1;
+ data[Yaw] = pose[Yaw];
+ data[Pitch] = pose[Pitch];
+ data[Roll] = pose[Roll];
+ data[TX] = pose[TX] * .1;
+ data[TY] = pose[TY] * .1;
+ data[TZ] = pose[TZ] * .1;
}
class TrackerDll : public Metadata
@@ -456,12 +450,6 @@ TrackerControls::TrackerControls()
tie_setting(s.resolution, ui.resolution);
tie_setting(s.force_fps, ui.cameraFPS);
tie_setting(s.fov, ui.cameraFOV);
- tie_setting(s.eyaw, ui.rx);
- tie_setting(s.epitch, ui.ry);
- tie_setting(s.eroll, ui.rz);
- tie_setting(s.ex, ui.tx);
- tie_setting(s.ey, ui.ty);
- tie_setting(s.ez, ui.tz);
tie_setting(s.headpos_x, ui.cx);
tie_setting(s.headpos_y, ui.cy);
tie_setting(s.headpos_z, ui.cz);
diff --git a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h
index f2207aef..c431d27a 100644
--- a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h
+++ b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h
@@ -28,7 +28,6 @@ struct settings {
value<double> fov, headpos_x, headpos_y, headpos_z;
value<int> camera_index, force_fps, resolution;
value<bool> red_only;
- value<bool> eyaw, epitch, eroll, ex, ey, ez;
value<double> marker_pitch;
settings() :
b(bundle("aruco-tracker")),
@@ -40,12 +39,6 @@ struct settings {
force_fps(b, "force-fps", 0),
resolution(b, "force-resolution", 0),
red_only(b, "red-only", false),
- eyaw(b, "enable-y", true),
- epitch(b, "enable-p", true),
- eroll(b, "enable-r", true),
- ex(b, "enable-x", true),
- ey(b, "enable-y", true),
- ez(b, "enable-z", true),
marker_pitch(b, "marker-pitch", 0)
{}
};
diff --git a/ftnoir_tracker_freepie-udp/freepie-udp-controls.ui b/ftnoir_tracker_freepie-udp/freepie-udp-controls.ui
index 937dafaa..9870372a 100644
--- a/ftnoir_tracker_freepie-udp/freepie-udp-controls.ui
+++ b/ftnoir_tracker_freepie-udp/freepie-udp-controls.ui
@@ -9,8 +9,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>208</width>
- <height>240</height>
+ <width>198</width>
+ <height>71</height>
</rect>
</property>
<property name="windowTitle">
@@ -26,145 +26,31 @@
<property name="autoFillBackground">
<bool>false</bool>
</property>
- <layout class="QGridLayout" name="gridLayout_3">
- <property name="topMargin">
- <number>0</number>
- </property>
- <item row="0" column="0" colspan="3">
- <widget class="QGroupBox" name="groupbox_port">
- <layout class="QGridLayout" name="gridLayout">
- <item row="0" column="1">
- <widget class="QSpinBox" name="port">
- <property name="minimum">
- <number>0</number>
- </property>
- <property name="maximum">
- <number>65535</number>
- </property>
- </widget>
- </item>
- <item row="0" column="0">
- <widget class="QLabel" name="label_5">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>UDP port</string>
- </property>
- </widget>
- </item>
- </layout>
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="0" column="0">
+ <widget class="QLabel" name="label_5">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>UDP port</string>
+ </property>
</widget>
</item>
- <item row="1" column="0" rowspan="2" colspan="3">
- <widget class="QGroupBox" name="groupBox_3">
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>85</height>
- </size>
+ <item row="0" column="1">
+ <widget class="QSpinBox" name="port">
+ <property name="minimum">
+ <number>0</number>
</property>
- <property name="title">
- <string>Enable axis</string>
+ <property name="maximum">
+ <number>65535</number>
</property>
- <layout class="QGridLayout" name="gridLayout_2">
- <item row="2" column="0">
- <widget class="QLabel" name="label_6">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Roll</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QCheckBox" name="chkEnablePitch">
- <property name="maximumSize">
- <size>
- <width>20</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="layoutDirection">
- <enum>Qt::LeftToRight</enum>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="0" column="0">
- <widget class="QLabel" name="label_11">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Yaw</string>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="label_9">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Pitch</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QCheckBox" name="chkEnableYaw">
- <property name="maximumSize">
- <size>
- <width>20</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="layoutDirection">
- <enum>Qt::LeftToRight</enum>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="QCheckBox" name="chkEnableRoll">
- <property name="maximumSize">
- <size>
- <width>20</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="layoutDirection">
- <enum>Qt::LeftToRight</enum>
- </property>
- <property name="styleSheet">
- <string notr="true"/>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- </layout>
</widget>
</item>
- <item row="3" column="1">
+ <item row="1" column="0" colspan="2">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
@@ -173,9 +59,6 @@
</item>
</layout>
</widget>
- <tabstops>
- <tabstop>port</tabstop>
- </tabstops>
<resources/>
<connections/>
<slots>
diff --git a/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp.cpp b/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp.cpp
index 7223a33f..718ec510 100644
--- a/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp.cpp
+++ b/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp.cpp
@@ -92,12 +92,9 @@ void TrackerImpl::GetHeadPoseData(double *data)
if (s.enable_z)
data[TZ] = pose[TZ];
#endif
- if (s.enable_yaw)
- data[Yaw] = pose[Yaw];
- if (s.enable_pitch)
- data[Pitch] = pose[Pitch];
- if (s.enable_roll)
- data[Roll] = pose[Roll];
+ data[Yaw] = pose[Yaw];
+ data[Pitch] = pose[Pitch];
+ data[Roll] = pose[Roll];
}
extern "C" FTNOIR_TRACKER_BASE_EXPORT ITracker* CALLING_CONVENTION GetConstructor()
diff --git a/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp.h b/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp.h
index 8cefb509..b3f028fc 100644
--- a/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp.h
+++ b/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp.h
@@ -16,13 +16,9 @@ using namespace options;
struct settings {
pbundle b;
value<int> port;
- value<bool> enable_roll, enable_pitch, enable_yaw;
settings() :
b(bundle("freepie-udp-tracker")),
- port(b, "port", 4237),
- enable_roll(b, "enable-roll", true),
- enable_pitch(b, "enable-pitch", true),
- enable_yaw(b, "enable-yaw", true)
+ port(b, "port", 4237)
{}
};
diff --git a/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp_dialog.cpp b/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp_dialog.cpp
index d845ff4a..1489e336 100644
--- a/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp_dialog.cpp
+++ b/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp_dialog.cpp
@@ -9,9 +9,6 @@ TrackerDialog::TrackerDialog()
connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(doCancel()));
tie_setting(s.port, ui.port);
- tie_setting(s.enable_yaw, ui.chkEnableYaw);
- tie_setting(s.enable_pitch, ui.chkEnablePitch);
- tie_setting(s.enable_roll, ui.chkEnableRoll);
}
void TrackerDialog::doOK() {
diff --git a/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp b/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp
index ef7e185d..7d6fc24e 100644
--- a/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp
+++ b/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp
@@ -197,24 +197,16 @@ void Tracker::GetHeadPoseData(double *data)
shm->frame.width = 0;
}
if (shm->result.filled) {
- if (s.enableRX)
- data[Yaw] = shm->result.rotx;
- if (s.enableRY) {
- data[Pitch] = shm->result.roty;
- }
- if (s.enableRZ) {
- data[Roll] = shm->result.rotz;
- }
- if (s.enableTX)
- data[TX] = shm->result.tx;
- if (s.enableTY)
- data[TY] = shm->result.ty;
- if (s.enableTZ)
- data[TZ] = shm->result.tz;
if (fabs(data[Yaw]) > 60 || fabs(data[Pitch]) > 50 || fabs(data[Roll]) > 40)
{
shm->pause = true;
}
+ data[Yaw] = shm->result.rotx;
+ data[Pitch] = shm->result.roty;
+ data[Roll] = shm->result.rotz;
+ data[TX] = shm->result.tx;
+ data[TY] = shm->result.ty;
+ data[TZ] = shm->result.tz;
} else {
shm->pause = false;
}
@@ -267,12 +259,6 @@ TrackerControls::TrackerControls()
tie_setting(s.camera_idx, ui.cameraName);
tie_setting(s.fps, ui.cameraFPS);
tie_setting(s.fov, ui.cameraFOV);
- tie_setting(s.enableTX, ui.tx);
- tie_setting(s.enableTY, ui.ty);
- tie_setting(s.enableTZ, ui.tz);
- tie_setting(s.enableRX, ui.rx);
- tie_setting(s.enableRY, ui.ry);
- tie_setting(s.enableRZ, ui.rz);
tie_setting(s.resolution, ui.resolution);
connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(doCancel()));
connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(doOK()));
diff --git a/ftnoir_tracker_ht/ftnoir_tracker_ht.h b/ftnoir_tracker_ht/ftnoir_tracker_ht.h
index 583249dc..418137bc 100644
--- a/ftnoir_tracker_ht/ftnoir_tracker_ht.h
+++ b/ftnoir_tracker_ht/ftnoir_tracker_ht.h
@@ -20,17 +20,10 @@ using namespace options;
struct settings {
pbundle b;
- value<bool> enableTX, enableTY, enableTZ, enableRX, enableRY, enableRZ;
value<double> fov;
value<int> fps, camera_idx, resolution;
settings() :
b(bundle("HT-Tracker")),
- enableTX(b, "enable-tx", true),
- enableTY(b, "enable-ty", true),
- enableTZ(b, "enable-tz", true),
- enableRX(b, "enable-rx", true),
- enableRY(b, "enable-ry", true),
- enableRZ(b, "enable-rz", true),
fov(b, "fov", 56),
fps(b, "fps", 0),
camera_idx(b, "camera-index", 0),
diff --git a/ftnoir_tracker_ht/ht-trackercontrols.ui b/ftnoir_tracker_ht/ht-trackercontrols.ui
index f57022c8..0b94ffc5 100644
--- a/ftnoir_tracker_ht/ht-trackercontrols.ui
+++ b/ftnoir_tracker_ht/ht-trackercontrols.ui
@@ -9,8 +9,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>531</width>
- <height>166</height>
+ <width>354</width>
+ <height>158</height>
</rect>
</property>
<property name="sizePolicy">
@@ -52,91 +52,6 @@
</property>
</widget>
</item>
- <item row="0" column="2" rowspan="3">
- <widget class="QGroupBox" name="groupBox">
- <property name="title">
- <string>Enable axes</string>
- </property>
- <widget class="QCheckBox" name="rx">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>20</y>
- <width>70</width>
- <height>17</height>
- </rect>
- </property>
- <property name="text">
- <string>RX</string>
- </property>
- </widget>
- <widget class="QCheckBox" name="ry">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>40</y>
- <width>70</width>
- <height>17</height>
- </rect>
- </property>
- <property name="text">
- <string>RY</string>
- </property>
- </widget>
- <widget class="QCheckBox" name="rz">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>60</y>
- <width>70</width>
- <height>17</height>
- </rect>
- </property>
- <property name="text">
- <string>RZ</string>
- </property>
- </widget>
- <widget class="QCheckBox" name="tx">
- <property name="geometry">
- <rect>
- <x>60</x>
- <y>20</y>
- <width>70</width>
- <height>17</height>
- </rect>
- </property>
- <property name="text">
- <string>TX</string>
- </property>
- </widget>
- <widget class="QCheckBox" name="ty">
- <property name="geometry">
- <rect>
- <x>60</x>
- <y>40</y>
- <width>70</width>
- <height>17</height>
- </rect>
- </property>
- <property name="text">
- <string>TY</string>
- </property>
- </widget>
- <widget class="QCheckBox" name="tz">
- <property name="geometry">
- <rect>
- <x>60</x>
- <y>60</y>
- <width>70</width>
- <height>17</height>
- </rect>
- </property>
- <property name="text">
- <string>TZ</string>
- </property>
- </widget>
- </widget>
- </item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
@@ -214,7 +129,7 @@
</item>
</widget>
</item>
- <item row="4" column="2">
+ <item row="4" column="1">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
diff --git a/ftnoir_tracker_hydra/ftnoir_hydra_clientcontrols.ui b/ftnoir_tracker_hydra/ftnoir_hydra_clientcontrols.ui
index e5e41bec..7cfac075 100644
--- a/ftnoir_tracker_hydra/ftnoir_hydra_clientcontrols.ui
+++ b/ftnoir_tracker_hydra/ftnoir_hydra_clientcontrols.ui
@@ -9,8 +9,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>172</width>
- <height>145</height>
+ <width>190</width>
+ <height>62</height>
</rect>
</property>
<property name="windowTitle">
@@ -26,167 +26,15 @@
<property name="autoFillBackground">
<bool>false</bool>
</property>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <widget class="QGroupBox" name="groupBox_3">
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>85</height>
- </size>
+ <layout class="QFormLayout" name="formLayout">
+ <item row="0" column="0">
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>None whatsoever</string>
</property>
- <property name="title">
- <string>Enable Axis</string>
- </property>
- <layout class="QGridLayout" name="gridLayout">
- <item row="0" column="0">
- <widget class="QLabel" name="label_61">
- <property name="text">
- <string>Pitch:</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QCheckBox" name="chkEnablePitch">
- <property name="maximumSize">
- <size>
- <width>20</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="layoutDirection">
- <enum>Qt::LeftToRight</enum>
- </property>
- <property name="styleSheet">
- <string notr="true"/>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="0" column="2">
- <widget class="QLabel" name="label_6">
- <property name="text">
- <string>X:</string>
- </property>
- </widget>
- </item>
- <item row="0" column="3">
- <widget class="QCheckBox" name="chkEnableX">
- <property name="maximumSize">
- <size>
- <width>20</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="layoutDirection">
- <enum>Qt::LeftToRight</enum>
- </property>
- <property name="styleSheet">
- <string notr="true"/>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="label_91">
- <property name="text">
- <string>Yaw:</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QCheckBox" name="chkEnableYaw">
- <property name="maximumSize">
- <size>
- <width>20</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="layoutDirection">
- <enum>Qt::LeftToRight</enum>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="1" column="2">
- <widget class="QLabel" name="label_9">
- <property name="text">
- <string>Y:</string>
- </property>
- </widget>
- </item>
- <item row="1" column="3">
- <widget class="QCheckBox" name="chkEnableY">
- <property name="maximumSize">
- <size>
- <width>20</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="layoutDirection">
- <enum>Qt::LeftToRight</enum>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="2" column="0">
- <widget class="QLabel" name="label_111">
- <property name="text">
- <string>Roll:</string>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="QCheckBox" name="chkEnableRoll">
- <property name="maximumSize">
- <size>
- <width>20</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="layoutDirection">
- <enum>Qt::LeftToRight</enum>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="2" column="2">
- <widget class="QLabel" name="label_11">
- <property name="text">
- <string>Z:</string>
- </property>
- </widget>
- </item>
- <item row="2" column="3">
- <widget class="QCheckBox" name="chkEnableZ">
- <property name="maximumSize">
- <size>
- <width>20</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="layoutDirection">
- <enum>Qt::LeftToRight</enum>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- </layout>
</widget>
</item>
- <item>
+ <item row="1" column="0">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
diff --git a/ftnoir_tracker_hydra/ftnoir_tracker_hydra.cpp b/ftnoir_tracker_hydra/ftnoir_tracker_hydra.cpp
index 6345ac57..5770f015 100644
--- a/ftnoir_tracker_hydra/ftnoir_tracker_hydra.cpp
+++ b/ftnoir_tracker_hydra/ftnoir_tracker_hydra.cpp
@@ -8,13 +8,10 @@
# define SIXENSE_UTILS_STATIC_LIB
#endif
#include <sixense.h>
-#include <sixense_math.hpp>
+Hydra_Tracker::Hydra_Tracker() : should_quit(false) {}
-Hydra_Tracker::Hydra_Tracker() : should_quit(false)
-{
- for (int i = 0; i < 6; i++)
- newHeadPose[i] = 0;
-}
+#pragma GCC diagnostic ignored "-Wreorder"
+#include <sixense_math.hpp>
Hydra_Tracker::~Hydra_Tracker()
{
@@ -38,33 +35,13 @@ void Hydra_Tracker::GetHeadPoseData(double *data)
float ypr[3];
mat.getEulerAngles().fill(ypr);
- newHeadPose[Yaw] = ypr[0];
- newHeadPose[Pitch] = ypr[1];
- newHeadPose[Roll] = ypr[2];
-
-
- newHeadPose[TX] = acd.controllers[0].pos[0]/50.0f;
- newHeadPose[TY] = acd.controllers[0].pos[1]/50.0f;
- newHeadPose[TZ] = acd.controllers[0].pos[2]/50.0f;
-
- if (s.bEnableX) {
- data[TX] = newHeadPose[TX];
- }
- if (s.bEnableY) {
- data[TY] = newHeadPose[TY];
- }
- if (s.bEnableY) {
- data[TZ] = newHeadPose[TZ];
- }
- 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[TX] = acd.controllers[0].pos[0]/50.0;
+ data[TY] = acd.controllers[0].pos[1]/50.0;
+ data[TZ] = acd.controllers[0].pos[2]/50.0;
+ constexpr double r2d = 57.295781;
+ data[Yaw] = ypr[0] * r2d;
+ data[Pitch] = ypr[1] * r2d;
+ data[Roll] = ypr[2] * r2d;
}
extern "C" FTNOIR_TRACKER_BASE_EXPORT ITracker* CALLING_CONVENTION GetConstructor()
diff --git a/ftnoir_tracker_hydra/ftnoir_tracker_hydra.h b/ftnoir_tracker_hydra/ftnoir_tracker_hydra.h
index fdfc2643..2b3c84a7 100644
--- a/ftnoir_tracker_hydra/ftnoir_tracker_hydra.h
+++ b/ftnoir_tracker_hydra/ftnoir_tracker_hydra.h
@@ -6,15 +6,8 @@ using namespace options;
struct settings {
pbundle b;
- value<bool> bEnableRoll, bEnablePitch, bEnableYaw, bEnableX, bEnableY, bEnableZ;
settings() :
- b(bundle("tracker-hydra")),
- bEnableRoll(b, "enable-rz", true),
- bEnablePitch(b, "enable-ry", true),
- bEnableYaw(b, "enable-rx", true),
- bEnableX(b, "enable-tx", true),
- bEnableY(b, "enable-ty", true),
- bEnableZ(b, "enable-tz", true)
+ b(bundle("tracker-hydra"))
{}
};
@@ -25,15 +18,11 @@ public:
~Hydra_Tracker();
void StartTracker(QFrame *) override;
void GetHeadPoseData(double *data) override;
+ virtual int preferredHz() override { return 250; }
volatile bool should_quit;
-protected:
- void run(); // qthread override run method
private:
settings s;
- bool isCalibrated;
- double newHeadPose[6]; // Structure with new headpose
QMutex mutex;
- virtual int preferredHz() override { return 250; }
};
class TrackerControls: public QWidget, public ITrackerDialog
diff --git a/ftnoir_tracker_hydra/ftnoir_tracker_hydra_dialog.cpp b/ftnoir_tracker_hydra/ftnoir_tracker_hydra_dialog.cpp
index 6c98a0a1..3df77d15 100644
--- a/ftnoir_tracker_hydra/ftnoir_tracker_hydra_dialog.cpp
+++ b/ftnoir_tracker_hydra/ftnoir_tracker_hydra_dialog.cpp
@@ -9,13 +9,6 @@ QWidget()
// Connect Qt signals to member-functions
connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(doOK()));
connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(doCancel()));
-
- tie_setting(s.bEnableYaw, ui.chkEnableYaw);
- tie_setting(s.bEnablePitch, ui.chkEnablePitch);
- tie_setting(s.bEnableRoll, ui.chkEnableRoll);
- tie_setting(s.bEnableX, ui.chkEnableX);
- tie_setting(s.bEnableY, ui.chkEnableY);
- tie_setting(s.bEnableZ, ui.chkEnableZ);
}
void TrackerControls::doOK() {
diff --git a/ftnoir_tracker_pt/FTNoIR_PT_Controls.ui b/ftnoir_tracker_pt/FTNoIR_PT_Controls.ui
index 0bbec7e1..44dfc060 100644
--- a/ftnoir_tracker_pt/FTNoIR_PT_Controls.ui
+++ b/ftnoir_tracker_pt/FTNoIR_PT_Controls.ui
@@ -130,245 +130,6 @@
</widget>
</item>
<item>
- <widget class="QGroupBox" name="groupBox_3">
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>85</height>
- </size>
- </property>
- <property name="title">
- <string>Enable Axis</string>
- </property>
- <layout class="QHBoxLayout" name="horizontalLayout_5">
- <item>
- <layout class="QGridLayout" name="gridLayout_2">
- <item row="0" column="0">
- <widget class="QLabel" name="label_6">
- <property name="text">
- <string>Roll:</string>
- </property>
- <property name="buddy">
- <cstring>chkEnableRoll</cstring>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="label_9">
- <property name="text">
- <string>Pitch:</string>
- </property>
- <property name="buddy">
- <cstring>chkEnablePitch</cstring>
- </property>
- </widget>
- </item>
- <item row="2" column="0">
- <widget class="QLabel" name="label_11">
- <property name="text">
- <string>Yaw:</string>
- </property>
- <property name="buddy">
- <cstring>chkEnableYaw</cstring>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QCheckBox" name="chkEnableRoll">
- <property name="maximumSize">
- <size>
- <width>20</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="layoutDirection">
- <enum>Qt::LeftToRight</enum>
- </property>
- <property name="styleSheet">
- <string notr="true"/>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QCheckBox" name="chkEnablePitch">
- <property name="maximumSize">
- <size>
- <width>20</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="layoutDirection">
- <enum>Qt::LeftToRight</enum>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="QCheckBox" name="chkEnableYaw">
- <property name="maximumSize">
- <size>
- <width>20</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="layoutDirection">
- <enum>Qt::LeftToRight</enum>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="0" column="3">
- <widget class="QLabel" name="label_14">
- <property name="text">
- <string>X:</string>
- </property>
- <property name="buddy">
- <cstring>chkEnableX</cstring>
- </property>
- </widget>
- </item>
- <item row="0" column="4">
- <widget class="QCheckBox" name="chkEnableX">
- <property name="maximumSize">
- <size>
- <width>20</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="layoutDirection">
- <enum>Qt::LeftToRight</enum>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="1" column="3">
- <widget class="QLabel" name="label_15">
- <property name="text">
- <string>Y:</string>
- </property>
- <property name="buddy">
- <cstring>chkEnableY</cstring>
- </property>
- </widget>
- </item>
- <item row="1" column="4">
- <widget class="QCheckBox" name="chkEnableY">
- <property name="maximumSize">
- <size>
- <width>20</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="layoutDirection">
- <enum>Qt::LeftToRight</enum>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="2" column="3">
- <widget class="QLabel" name="label_16">
- <property name="text">
- <string>Z:</string>
- </property>
- <property name="buddy">
- <cstring>chkEnableZ</cstring>
- </property>
- </widget>
- </item>
- <item row="2" column="4">
- <widget class="QCheckBox" name="chkEnableZ">
- <property name="maximumSize">
- <size>
- <width>20</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="layoutDirection">
- <enum>Qt::LeftToRight</enum>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="0" column="2">
- <spacer name="horizontalSpacer_3">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>QSizePolicy::Minimum</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="1" column="2">
- <spacer name="horizontalSpacer_5">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>QSizePolicy::Minimum</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="2" column="2">
- <spacer name="horizontalSpacer_8">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>QSizePolicy::Minimum</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
- <item>
- <spacer name="horizontalSpacer_4">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </widget>
- </item>
- <item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
@@ -1723,12 +1484,6 @@
<tabstops>
<tabstop>tabWidget</tabstop>
<tabstop>reset_spin</tabstop>
- <tabstop>chkEnableRoll</tabstop>
- <tabstop>chkEnablePitch</tabstop>
- <tabstop>chkEnableYaw</tabstop>
- <tabstop>chkEnableX</tabstop>
- <tabstop>chkEnableY</tabstop>
- <tabstop>chkEnableZ</tabstop>
<tabstop>camdevice_combo</tabstop>
<tabstop>res_x_spin</tabstop>
<tabstop>res_y_spin</tabstop>
diff --git a/ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.cpp b/ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.cpp
index 00d10d13..4ba981a5 100644
--- a/ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.cpp
+++ b/ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.cpp
@@ -57,13 +57,6 @@ TrackerDialog::TrackerDialog()
tie_setting(s.threshold_secondary, ui.threshold_secondary_slider);
tie_setting(s.threshold, ui.threshold_slider);
- tie_setting(s.bEnableYaw, ui.chkEnableYaw);
- tie_setting(s.bEnablePitch, ui.chkEnablePitch);
- tie_setting(s.bEnableRoll, ui.chkEnableRoll);
- tie_setting(s.bEnableX, ui.chkEnableX);
- tie_setting(s.bEnableY, ui.chkEnableY);
- tie_setting(s.bEnableZ, ui.chkEnableZ);
-
tie_setting(s.min_point_size, ui.mindiam_spin);
tie_setting(s.max_point_size, ui.maxdiam_spin);
diff --git a/ftnoir_tracker_pt/ftnoir_tracker_pt_settings.h b/ftnoir_tracker_pt/ftnoir_tracker_pt_settings.h
index 109090b3..1eca1e35 100644
--- a/ftnoir_tracker_pt/ftnoir_tracker_pt_settings.h
+++ b/ftnoir_tracker_pt/ftnoir_tracker_pt_settings.h
@@ -38,9 +38,6 @@ struct settings
value<int> reset_time;
- value<bool> bEnableYaw, bEnablePitch, bEnableRoll;
- value<bool> bEnableX, bEnableY, bEnableZ;
-
value<int> clip_ty, clip_tz, clip_by, clip_bz;
value<int> active_model_panel, cap_x, cap_y, cap_z;
@@ -70,12 +67,6 @@ struct settings
t_MH_y(b, "model-centroid-y", 0),
t_MH_z(b, "model-centroid-z", 0),
reset_time(b, "reset-time", 2000),
- bEnableYaw(b, "enable-yaw", true),
- bEnablePitch(b, "enable-pitch", true),
- bEnableRoll(b, "enable-roll", true),
- bEnableX(b, "enable-x", true),
- bEnableY(b, "enable-y", true),
- bEnableZ(b, "enable-z", true),
clip_ty(b, "clip-ty", 0),
clip_tz(b, "clip-tz", 0),
clip_by(b, "clip-by", 0),
diff --git a/ftnoir_tracker_rift/ftnoir_rift_clientcontrols.ui b/ftnoir_tracker_rift/ftnoir_rift_clientcontrols.ui
index 62edbec5..20c8f00b 100644
--- a/ftnoir_tracker_rift/ftnoir_rift_clientcontrols.ui
+++ b/ftnoir_tracker_rift/ftnoir_rift_clientcontrols.ui
@@ -9,8 +9,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>532</width>
- <height>481</height>
+ <width>218</width>
+ <height>200</height>
</rect>
</property>
<property name="sizePolicy">
@@ -33,7 +33,7 @@
<bool>false</bool>
</property>
<layout class="QGridLayout" name="gridLayout_2">
- <item row="2" column="0">
+ <item row="0" column="0">
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Yaw spring</string>
@@ -151,7 +151,7 @@
</layout>
</widget>
</item>
- <item row="3" column="0">
+ <item row="1" column="0">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
@@ -164,198 +164,6 @@
</property>
</widget>
</item>
- <item row="0" column="0">
- <widget class="QGroupBox" name="groupBox_3">
- <property name="title">
- <string>Axes</string>
- </property>
- <property name="flat">
- <bool>false</bool>
- </property>
- <layout class="QFormLayout" name="formLayout_2">
- <property name="fieldGrowthPolicy">
- <enum>QFormLayout::ExpandingFieldsGrow</enum>
- </property>
- <item row="0" column="0">
- <widget class="QLabel" name="label_6">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Pitch:</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QCheckBox" name="chkEnablePitch">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="maximumSize">
- <size>
- <width>20</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="layoutDirection">
- <enum>Qt::LeftToRight</enum>
- </property>
- <property name="styleSheet">
- <string notr="true"/>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="label_9">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Yaw:</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QCheckBox" name="chkEnableYaw">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="maximumSize">
- <size>
- <width>20</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="layoutDirection">
- <enum>Qt::LeftToRight</enum>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="2" column="0">
- <widget class="QLabel" name="label_11">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Roll:</string>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="QCheckBox" name="chkEnableRoll">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="maximumSize">
- <size>
- <width>20</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="layoutDirection">
- <enum>Qt::LeftToRight</enum>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="3" column="0">
- <widget class="QLabel" name="label_7">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>X</string>
- </property>
- </widget>
- </item>
- <item row="3" column="1">
- <widget class="QCheckBox" name="chkEnableX">
- <property name="layoutDirection">
- <enum>Qt::LeftToRight</enum>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="4" column="0">
- <widget class="QLabel" name="label_8">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Y</string>
- </property>
- </widget>
- </item>
- <item row="4" column="1">
- <widget class="QCheckBox" name="chkEnableY">
- <property name="layoutDirection">
- <enum>Qt::LeftToRight</enum>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="5" column="0">
- <widget class="QLabel" name="label_10">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Z</string>
- </property>
- </widget>
- </item>
- <item row="5" column="1">
- <widget class="QCheckBox" name="chkEnableZ">
- <property name="layoutDirection">
- <enum>Qt::LeftToRight</enum>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
</layout>
</widget>
<resources/>
diff --git a/ftnoir_tracker_rift/ftnoir_tracker_rift.cpp b/ftnoir_tracker_rift/ftnoir_tracker_rift.cpp
index 33d8f418..46e8c29f 100644
--- a/ftnoir_tracker_rift/ftnoir_tracker_rift.cpp
+++ b/ftnoir_tracker_rift/ftnoir_tracker_rift.cpp
@@ -55,18 +55,13 @@ void Rift_Tracker::GetHeadPoseData(double *data)
yaw += s.constant_drift;
old_yaw=yaw;
}
- if (s.bEnableYaw)
- data[Yaw] = yaw * 57.295781;
- if (s.bEnablePitch)
- data[Pitch] = pitch * -57.295781;
- if (s.bEnableRoll)
- data[Roll] = roll * 57.295781;
- if (s.bEnableX)
- data[TX] = pose.Position.x * -1e2;
- if (s.bEnableY)
- data[TY] = pose.Position.y * 1e2;
- if (s.bEnableX)
- data[TZ] = pose.Position.z * 1e2;
+ 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;
}
}
}
diff --git a/ftnoir_tracker_rift/ftnoir_tracker_rift.h b/ftnoir_tracker_rift/ftnoir_tracker_rift.h
index ee51b2cb..de224ca5 100644
--- a/ftnoir_tracker_rift/ftnoir_tracker_rift.h
+++ b/ftnoir_tracker_rift/ftnoir_tracker_rift.h
@@ -12,16 +12,10 @@ using namespace options;
struct settings {
pbundle b;
- value<bool> bEnableYaw, bEnablePitch, bEnableRoll, bEnableX, bEnableY, bEnableZ, useYawSpring;
+ value<bool> useYawSpring;
value<double> constant_drift, persistence, deadzone;
settings() :
b(bundle("Rift")),
- bEnableYaw(b, "EnableYaw", true),
- bEnablePitch(b, "EnablePitch", true),
- bEnableRoll(b, "EnableRoll", true),
- bEnableX(b, "EnableX", true),
- bEnableY(b, "EnableY", true),
- bEnableZ(b, "EnableZ", true),
useYawSpring(b, "yaw-spring", false),
constant_drift(b, "constant-drift", 0.000005),
persistence(b, "persistence", 0.99999),
diff --git a/ftnoir_tracker_rift/ftnoir_tracker_rift_dialog.cpp b/ftnoir_tracker_rift/ftnoir_tracker_rift_dialog.cpp
index cc8079bf..390eac0e 100644
--- a/ftnoir_tracker_rift/ftnoir_tracker_rift_dialog.cpp
+++ b/ftnoir_tracker_rift/ftnoir_tracker_rift_dialog.cpp
@@ -9,14 +9,6 @@ QWidget()
connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(doOK()));
connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(doCancel()));
- tie_setting(s.bEnableYaw, ui.chkEnableYaw);
- tie_setting(s.bEnablePitch, ui.chkEnablePitch);
- tie_setting(s.bEnableRoll, ui.chkEnableRoll);
-
- tie_setting(s.bEnableX, ui.chkEnableX);
- tie_setting(s.bEnableY, ui.chkEnableY);
- tie_setting(s.bEnableZ, ui.chkEnableZ);
-
tie_setting(s.constant_drift, ui.constantDrift);
tie_setting(s.deadzone, ui.deadzone);
tie_setting(s.persistence, ui.persistence);
diff --git a/ftnoir_tracker_udp/ftnoir_ftnclientcontrols.ui b/ftnoir_tracker_udp/ftnoir_ftnclientcontrols.ui
index 6f81a50b..f485e67f 100644
--- a/ftnoir_tracker_udp/ftnoir_ftnclientcontrols.ui
+++ b/ftnoir_tracker_udp/ftnoir_ftnclientcontrols.ui
@@ -9,8 +9,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>411</width>
- <height>232</height>
+ <width>216</width>
+ <height>71</height>
</rect>
</property>
<property name="windowTitle">
@@ -26,353 +26,35 @@
<property name="autoFillBackground">
<bool>false</bool>
</property>
- <layout class="QVBoxLayout" name="_vertical_layout">
- <item>
- <layout class="QGridLayout" name="gridLayout">
- <item row="1" column="0">
- <widget class="QLabel" name="label_5">
- <property name="text">
- <string>Port-number</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QSpinBox" name="spinPortNumber">
- <property name="minimum">
- <number>0</number>
- </property>
- <property name="maximum">
- <number>65535</number>
- </property>
- </widget>
- </item>
- <item row="1" column="2">
- <spacer name="horizontalSpacer_3">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
- <item>
- <widget class="QGroupBox" name="groupBox_3">
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>85</height>
- </size>
- </property>
- <property name="title">
- <string>Enable Axis</string>
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="0" column="0">
+ <widget class="QLabel" name="label_5">
+ <property name="text">
+ <string>Port</string>
</property>
- <widget class="QWidget" name="layoutWidget">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>20</y>
- <width>150</width>
- <height>73</height>
- </rect>
- </property>
- <layout class="QGridLayout" name="gridLayout_2">
- <item row="0" column="0">
- <widget class="QLabel" name="label_6">
- <property name="text">
- <string>Roll:</string>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="label_9">
- <property name="text">
- <string>Pitch:</string>
- </property>
- </widget>
- </item>
- <item row="2" column="0">
- <widget class="QLabel" name="label_11">
- <property name="text">
- <string>Yaw:</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QCheckBox" name="chkEnableRoll">
- <property name="maximumSize">
- <size>
- <width>20</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="layoutDirection">
- <enum>Qt::LeftToRight</enum>
- </property>
- <property name="styleSheet">
- <string notr="true"/>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QCheckBox" name="chkEnablePitch">
- <property name="maximumSize">
- <size>
- <width>20</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="layoutDirection">
- <enum>Qt::LeftToRight</enum>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="QCheckBox" name="chkEnableYaw">
- <property name="maximumSize">
- <size>
- <width>20</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="layoutDirection">
- <enum>Qt::LeftToRight</enum>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="0" column="3">
- <widget class="QLabel" name="label_14">
- <property name="text">
- <string>X:</string>
- </property>
- </widget>
- </item>
- <item row="0" column="4">
- <widget class="QCheckBox" name="chkEnableX">
- <property name="maximumSize">
- <size>
- <width>20</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="layoutDirection">
- <enum>Qt::LeftToRight</enum>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="1" column="3">
- <widget class="QLabel" name="label_15">
- <property name="text">
- <string>Y:</string>
- </property>
- </widget>
- </item>
- <item row="1" column="4">
- <widget class="QCheckBox" name="chkEnableY">
- <property name="maximumSize">
- <size>
- <width>20</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="layoutDirection">
- <enum>Qt::LeftToRight</enum>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="2" column="3">
- <widget class="QLabel" name="label_16">
- <property name="text">
- <string>Z:</string>
- </property>
- </widget>
- </item>
- <item row="2" column="4">
- <widget class="QCheckBox" name="chkEnableZ">
- <property name="maximumSize">
- <size>
- <width>20</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="layoutDirection">
- <enum>Qt::LeftToRight</enum>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="0" column="2">
- <spacer name="horizontalSpacer_4">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>QSizePolicy::Minimum</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </widget>
</widget>
</item>
- <item>
- <spacer name="verticalSpacer">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
+ <item row="0" column="1">
+ <widget class="QSpinBox" name="spinPortNumber">
+ <property name="minimum">
+ <number>0</number>
</property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>40</height>
- </size>
+ <property name="maximum">
+ <number>65535</number>
</property>
- </spacer>
- </item>
- <item>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <widget class="QLabel" name="label">
- <property name="text">
- <string>Enter the port-number for the remote PC.</string>
- </property>
- <property name="wordWrap">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLabel" name="label_3">
- <property name="text">
- <string>Remember: you may have to change firewall-settings too!</string>
- </property>
- </widget>
- </item>
- </layout>
+ </widget>
</item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout">
- <item>
- <spacer name="horizontalSpacer_2">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout_2">
- <property name="sizeConstraint">
- <enum>QLayout::SetDefaultConstraint</enum>
- </property>
- <item>
- <widget class="QPushButton" name="btnOK">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>100</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>100</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="text">
- <string>OK</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="btnCancel">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>100</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>100</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="text">
- <string>Cancel</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <spacer name="horizontalSpacer">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>QSizePolicy::Fixed</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>10</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
+ <item row="1" column="1">
+ <widget class="QDialogButtonBox" name="buttonBox">
+ <property name="standardButtons">
+ <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+ </property>
+ </widget>
</item>
</layout>
</widget>
<tabstops>
<tabstop>spinPortNumber</tabstop>
- <tabstop>btnOK</tabstop>
- <tabstop>btnCancel</tabstop>
</tabstops>
<resources/>
<connections/>
diff --git a/ftnoir_tracker_udp/ftnoir_tracker_udp.cpp b/ftnoir_tracker_udp/ftnoir_tracker_udp.cpp
index 1b6d9ddd..335616d5 100644
--- a/ftnoir_tracker_udp/ftnoir_tracker_udp.cpp
+++ b/ftnoir_tracker_udp/ftnoir_tracker_udp.cpp
@@ -62,18 +62,8 @@ void FTNoIR_Tracker::StartTracker(QFrame*)
void FTNoIR_Tracker::GetHeadPoseData(double *data)
{
QMutexLocker foo(&mutex);
- if (s.enable_x)
- data[TX] = newHeadPose[TX];
- if (s.enable_y)
- data[TY] = newHeadPose[TY];
- if (s.enable_z)
- data[TZ] = newHeadPose[TZ];
- if (s.enable_yaw)
- data[Yaw] = newHeadPose[Yaw];
- if (s.enable_pitch)
- data[Pitch] = newHeadPose[Pitch];
- if (s.enable_roll)
- data[Roll] = newHeadPose[Roll];
+ for (int i = 0; i < 6; i++)
+ data[i] = last_recv_pose[i];
}
extern "C" FTNOIR_TRACKER_BASE_EXPORT ITracker* CALLING_CONVENTION GetConstructor()
diff --git a/ftnoir_tracker_udp/ftnoir_tracker_udp.h b/ftnoir_tracker_udp/ftnoir_tracker_udp.h
index 22c9c465..92d321b2 100644
--- a/ftnoir_tracker_udp/ftnoir_tracker_udp.h
+++ b/ftnoir_tracker_udp/ftnoir_tracker_udp.h
@@ -10,17 +10,9 @@ using namespace options;
struct settings {
pbundle b;
value<int> port;
- value<bool> enable_roll, enable_pitch, enable_yaw,
- enable_x, enable_y, enable_z;
settings() :
b(bundle("udp-tracker")),
- port(b, "port", 4242),
- enable_roll(b, "enable-roll", true),
- enable_pitch(b, "enable-pitch", true),
- enable_yaw(b, "enable-yaw", true),
- enable_x(b, "enable-x", true),
- enable_y(b, "enable-y", true),
- enable_z(b, "enable-y", true)
+ port(b, "port", 4242)
{}
};
diff --git a/ftnoir_tracker_udp/ftnoir_tracker_udp_dialog.cpp b/ftnoir_tracker_udp/ftnoir_tracker_udp_dialog.cpp
index 17b174e8..16a59292 100644
--- a/ftnoir_tracker_udp/ftnoir_tracker_udp_dialog.cpp
+++ b/ftnoir_tracker_udp/ftnoir_tracker_udp_dialog.cpp
@@ -30,15 +30,9 @@ QWidget()
{
ui.setupUi( this );
- connect(ui.btnOK, SIGNAL(clicked()), this, SLOT(doOK()));
- connect(ui.btnCancel, SIGNAL(clicked()), this, SLOT(doCancel()));
+ connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(doOK()));
+ connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(doCancel()));
- tie_setting(s.enable_x, ui.chkEnableX);
- tie_setting(s.enable_y, ui.chkEnableY);
- tie_setting(s.enable_z, ui.chkEnableZ);
- tie_setting(s.enable_yaw, ui.chkEnableYaw);
- tie_setting(s.enable_pitch, ui.chkEnablePitch);
- tie_setting(s.enable_roll, ui.chkEnableRoll);
tie_setting(s.port, ui.spinPortNumber);
}