summaryrefslogtreecommitdiffhomepage
path: root/proto-ft
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2019-09-22 16:47:59 +0200
committerStanislaw Halik <sthalik@misaki.pl>2019-09-22 16:51:51 +0200
commite36f509d2459ca74c0dc7fe2e8ea2275b88f0649 (patch)
tree2f62ae2004ef9fb2dcaceb7ded7bd404e41bbd92 /proto-ft
parent4063f006285db0473046bde645f236c814460eb0 (diff)
api: expose raw data to protocols
Issue: #975
Diffstat (limited to 'proto-ft')
-rw-r--r--proto-ft/ftnoir_protocol_ft.cpp9
-rw-r--r--proto-ft/ftnoir_protocol_ft.h2
2 files changed, 9 insertions, 2 deletions
diff --git a/proto-ft/ftnoir_protocol_ft.cpp b/proto-ft/ftnoir_protocol_ft.cpp
index 46879475..4f41c21c 100644
--- a/proto-ft/ftnoir_protocol_ft.cpp
+++ b/proto-ft/ftnoir_protocol_ft.cpp
@@ -51,7 +51,7 @@ static std::int32_t load(std::int32_t volatile& place)
return InterlockedCompareExchange((volatile LONG*) &place, 0, 0);
}
-void freetrack::pose(const double* headpose)
+void freetrack::pose(const double* headpose, const double* raw)
{
constexpr double d2r = M_PI/180;
@@ -76,6 +76,13 @@ void freetrack::pose(const double* headpose)
store(data->Pitch, pitch);
store(data->Roll, roll);
+ store(data->RawYaw, float(-raw[Yaw] * d2r));
+ store(data->RawPitch, float(raw[Pitch] * d2r));
+ store(data->RawRoll, float(raw[Roll] * d2r));
+ store(data->RawX, float(raw[TX] * 10));
+ store(data->RawY, float(raw[TY] * 10));
+ store(data->RawZ, float(raw[TZ] * 10));
+
const std::int32_t id = load(ft->GameID);
if (intGameID != id)
diff --git a/proto-ft/ftnoir_protocol_ft.h b/proto-ft/ftnoir_protocol_ft.h
index 0056721c..a59796dd 100644
--- a/proto-ft/ftnoir_protocol_ft.h
+++ b/proto-ft/ftnoir_protocol_ft.h
@@ -42,7 +42,7 @@ public:
freetrack() = default;
~freetrack() override;
module_status initialize() override;
- void pose(const double* pose) override;
+ void pose(const double* pose, const double*) override;
QString game_name() override;
private:
settings s;