summaryrefslogtreecommitdiffhomepage
path: root/tracker-hatire/ftnoir_tracker_hat.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tracker-hatire/ftnoir_tracker_hat.cpp')
-rw-r--r--tracker-hatire/ftnoir_tracker_hat.cpp21
1 files changed, 6 insertions, 15 deletions
diff --git a/tracker-hatire/ftnoir_tracker_hat.cpp b/tracker-hatire/ftnoir_tracker_hat.cpp
index 3ec89499..d9f0a33b 100644
--- a/tracker-hatire/ftnoir_tracker_hat.cpp
+++ b/tracker-hatire/ftnoir_tracker_hat.cpp
@@ -15,17 +15,11 @@
hatire::hatire()
{
- HAT.Rot[0]=0;
- HAT.Rot[1]=0;
- HAT.Rot[2]=0;
- HAT.Trans[0]=0;
- HAT.Trans[1]=0;
- HAT.Trans[2]=0;
-
- Begin.append((unsigned char) 0xAA);
- Begin.append((unsigned char) 0xAA);
- End.append((unsigned char) 0x55);
- End.append((unsigned char) 0x55);
+
+ Begin.append((unsigned char) 0xAA);
+ Begin.append((unsigned char) 0xAA);
+ End.append((unsigned char) 0x55);
+ End.append((unsigned char) 0x55);
}
hatire::~hatire() = default;
@@ -146,11 +140,8 @@ void hatire::data(double *data)
{ s.EnableRoll, s.InvertRoll, HAT.Rot[s.RollAxis], data[Roll] },
};
- for (unsigned i = 0; i < std::size(spec); i++)
- {
- auto& k = spec[i];
+ for (auto& k : spec)
k.place = (k.sign ? -1 : 1) * (k.enable ? k.input : 0);
- }
}
#include "ftnoir_tracker_hat_dialog.h"