summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2013-04-02 21:03:38 +0200
committerStanislaw Halik <sthalik@misaki.pl>2013-04-02 21:03:38 +0200
commit6a2d6858dd4bc8263666b151196fc6b856e5b815 (patch)
treee4360acce47d07b820abdaa85ba9b088f97403e6 /ftnoir_tracker_ht/ftnoir_tracker_ht.cpp
parent2fdbee9e9228a77b0f870a2245cfac33bc41aeba (diff)
More UI changes
Diffstat (limited to 'ftnoir_tracker_ht/ftnoir_tracker_ht.cpp')
-rw-r--r--ftnoir_tracker_ht/ftnoir_tracker_ht.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp b/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp
index 5785b21a..ffbf1be8 100644
--- a/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp
+++ b/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp
@@ -220,8 +220,12 @@ bool Tracker::GiveHeadPoseData(THeadPoseData* data)
if (shm->result.filled) {
if (enableRX)
data->yaw = shm->result.rotx;
- if (enableRY)
+ if (enableRY) {
data->pitch = shm->result.roty;
+ double sign = data->pitch >= 0 ? 1 : -1;
+ if (fabs(fabs(data->pitch) - 180) < fabs(data->pitch))
+ data->pitch = fabs(fabs(data->pitch) - 180) * sign;
+ }
if (enableRZ) {
data->roll = shm->result.rotz;
double sign = data->roll >= 0 ? 1 : -1;