diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2013-10-24 21:28:34 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2013-10-24 21:28:34 +0200 |
commit | f40d7a58d0032289e6c122bbd57bc8b6bed8ebcd (patch) | |
tree | 12850e810274f208f7c7643017dfdb5d4995558a /ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp | |
parent | a19d4fc2ec4ef759cae00505038c02c684c4106b (diff) |
actually finish the joystick impl
Diffstat (limited to 'ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp')
-rw-r--r-- | ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp b/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp index 73993999..35d3927f 100644 --- a/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp +++ b/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp @@ -198,6 +198,15 @@ start: js.rglSlider[1] }; + const double max[] = { + 100, + 100, + 100, + 180, + 90, + 180 + }; + for (int i = 0; i < 6; i++) { auto idx = axes[i] - 1; @@ -206,7 +215,7 @@ start: data[i] = 0; } else { - data[i] = values[i] / (double) AXIS_MAX; + data[i] = values[i] * max[i] / (double) AXIS_MAX; } } |