diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2014-09-12 07:46:02 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2014-09-12 07:47:03 +0200 |
commit | 63cd64275512c50948ccc6894a2547c707e8fbe3 (patch) | |
tree | 12a072c2c2af6040de6d4264cdaa5f746dd337fc /ftnoir_tracker_joystick | |
parent | 5d2d9bc14c0b97a2f5d3f5be6e533966f5a4df39 (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.cpp | 2 |
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); } } } |