summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2014-09-17 07:55:35 +0200
committerStanislaw Halik <sthalik@misaki.pl>2014-09-17 08:01:32 +0200
commitfff539163e23c687ef32d61aa91c16b2e616ec63 (patch)
tree30fbd827123e0e93f3c3657d9603ccef3bcf8968 /ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp
parentf8b65030eefbb8bf7ce09d5c0adbfd3192f1cf24 (diff)
remove win32-joystick axis remap
Feature provided for all trackers in core. Only confuses when both remaps used at the same time. Issue: #52
Diffstat (limited to 'ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp')
-rw-r--r--ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp21
1 files changed, 2 insertions, 19 deletions
diff --git a/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp b/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp
index e1d92b78..0e95f57d 100644
--- a/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp
+++ b/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp
@@ -196,26 +196,9 @@ void FTNoIR_Tracker::GetHeadPoseData(double *data)
90,
180
};
-
- int axes[] = {
- s.axis_0,
- s.axis_1,
- s.axis_2,
- s.axis_3,
- s.axis_4,
- s.axis_5
- };
-
+
for (int i = 0; i < 6; i++)
- {
- auto idx = axes[i] - 1;
- if (idx < 0 || idx > 7)
- {
- data[i] = 0;
- }
- else
- data[i] = values[i] * limits[i] / AXIS_MAX;
- }
+ data[i] = values[i] * limits[i] / AXIS_MAX;
}
extern "C" FTNOIR_TRACKER_BASE_EXPORT ITracker* CALLING_CONVENTION GetConstructor()