summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp
diff options
context:
space:
mode:
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()