diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2019-09-22 16:47:59 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2019-09-22 16:51:51 +0200 |
commit | e36f509d2459ca74c0dc7fe2e8ea2275b88f0649 (patch) | |
tree | 2f62ae2004ef9fb2dcaceb7ded7bd404e41bbd92 /proto-ft/ftnoir_protocol_ft.cpp | |
parent | 4063f006285db0473046bde645f236c814460eb0 (diff) |
api: expose raw data to protocols
Issue: #975
Diffstat (limited to 'proto-ft/ftnoir_protocol_ft.cpp')
-rw-r--r-- | proto-ft/ftnoir_protocol_ft.cpp | 9 |
1 files changed, 8 insertions, 1 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) |