summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_tracker_joystick
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2014-09-12 07:46:02 +0200
committerStanislaw Halik <sthalik@misaki.pl>2014-09-12 07:47:03 +0200
commit63cd64275512c50948ccc6894a2547c707e8fbe3 (patch)
tree12a072c2c2af6040de6d4264cdaa5f746dd337fc /ftnoir_tracker_joystick
parent5d2d9bc14c0b97a2f5d3f5be6e533966f5a4df39 (diff)
mid axis range already subtracted, correct branch test
Issue: #38
Diffstat (limited to 'ftnoir_tracker_joystick')
-rw-r--r--ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp b/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp
index cbb4440e..a4f026de 100644
--- a/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp
+++ b/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp
@@ -227,7 +227,7 @@ void FTNoIR_Tracker::GetHeadPoseData(double *data)
auto max = (max_[idx] - mid);
auto min = (mid - min_[idx]);
- data[i] = val * limits[i] / (double) (val > mid ? max : min);
+ data[i] = val * limits[i] / (double) (val > 0 ? max : min);
}
}
}