diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2013-10-27 02:55:05 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2013-10-27 02:57:30 +0200 |
commit | bc0bcee05ec795ba27c699ad2b2bb2ef0a213148 (patch) | |
tree | faa2dd12b5816ed307f9f9ac2977f3f33ef48d56 | |
parent | 532f3ee81709d3e1127437fce5dd32db5c835674 (diff) |
add Accela deadzone, Patrick was right!
Signed-off-by: Stanislaw Halik <sthalik@misaki.pl>
-rw-r--r-- | ftnoir_filter_accela/ftnoir_filter_accela.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ftnoir_filter_accela/ftnoir_filter_accela.cpp b/ftnoir_filter_accela/ftnoir_filter_accela.cpp index 781b3ba0..1168004f 100644 --- a/ftnoir_filter_accela/ftnoir_filter_accela.cpp +++ b/ftnoir_filter_accela/ftnoir_filter_accela.cpp @@ -5,6 +5,7 @@ * copyright notice and this permission notice appear in all copies.
*/
#include "ftnoir_filter_accela/ftnoir_filter_accela.h"
+#include <algorithm>
#include <cmath>
#include <QDebug>
#include <QMutexLocker>
@@ -65,7 +66,7 @@ void FTNoIR_Filter::receiveSettings(double rot, double trans, double zoom_fac) static inline double parabola(const double a, const double x)
{
const double a1 = 1./a;
- return a1 * pow(x, 2.025);
+ return a1 * pow(std::max<double>(x - 0.175, 1e-5), 2.2);
}
void FTNoIR_Filter::FilterHeadPoseData(const double* target_camera_position,
|