From 6a2d6858dd4bc8263666b151196fc6b856e5b815 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 2 Apr 2013 21:03:38 +0200 Subject: More UI changes --- ftnoir_tracker_ht/ftnoir_tracker_ht.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'ftnoir_tracker_ht') 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; -- cgit v1.2.3