diff options
Diffstat (limited to 'tracker-hatire')
-rw-r--r-- | tracker-hatire/ftnoir_tracker_hat.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tracker-hatire/ftnoir_tracker_hat.cpp b/tracker-hatire/ftnoir_tracker_hat.cpp index a3f10d35..9ac44cf2 100644 --- a/tracker-hatire/ftnoir_tracker_hat.cpp +++ b/tracker-hatire/ftnoir_tracker_hat.cpp @@ -10,6 +10,7 @@ */ #include <QDebug> #include "ftnoir_tracker_hat.h" +#include "compat/math.hpp" #include <algorithm> hatire::hatire() @@ -128,6 +129,9 @@ void hatire::data(double *data) CptError=0; } + for (unsigned k = 0; k < 3; k++) + HAT.Rot[k] = clamp(HAT.Rot[k], -180, 180); + const struct { bool enable; @@ -147,7 +151,7 @@ void hatire::data(double *data) for (unsigned i = 0; i < std::size(spec); i++) { auto& k = spec[i]; - k.place = (k.sign ? -1.f : 1.f) * (k.enable ? k.input : 0.f); + k.place = (k.sign ? -1 : 1) * (k.enable ? k.input : 0); } } |