summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_protocol_fg
diff options
context:
space:
mode:
Diffstat (limited to 'ftnoir_protocol_fg')
-rw-r--r--ftnoir_protocol_fg/ftnoir_protocol_fg.cpp19
-rw-r--r--ftnoir_protocol_fg/ftnoir_protocol_fg.h2
2 files changed, 9 insertions, 12 deletions
diff --git a/ftnoir_protocol_fg/ftnoir_protocol_fg.cpp b/ftnoir_protocol_fg/ftnoir_protocol_fg.cpp
index 0c259d61..1303d051 100644
--- a/ftnoir_protocol_fg/ftnoir_protocol_fg.cpp
+++ b/ftnoir_protocol_fg/ftnoir_protocol_fg.cpp
@@ -34,6 +34,7 @@
#include "ftnoir_protocol_fg.h"
#include <QFile>
#include "facetracknoir/global-settings.h"
+#include <ftnoir_tracker_base/ftnoir_tracker_types.h>
// For Todd and Arda Kutlu
//#define SEND_ASCII_DATA
@@ -99,24 +100,20 @@ void FTNoIR_Protocol::loadSettings() {
//
// Update Headpose in Game.
//
-void FTNoIR_Protocol::sendHeadposeToGame( THeadPoseData *headpose, THeadPoseData *rawheadpose ) {
+void FTNoIR_Protocol::sendHeadposeToGame( double *headpose, double *rawheadpose ) {
int no_bytes;
QHostAddress sender;
quint16 senderPort;
-#ifdef SEND_ASCII_DATA
-char data[100];
-#endif
-
//
// Copy the Raw measurements directly to the client.
//
- FlightData.x = headpose->x;
- FlightData.y = headpose->y;
- FlightData.z = headpose->z;
- FlightData.p = headpose->pitch;
- FlightData.h = headpose->yaw;
- FlightData.r = headpose->roll;
+ FlightData.x = headpose[TX];
+ FlightData.y = headpose[RY];
+ FlightData.z = headpose[TZ];
+ FlightData.p = headpose[TY];
+ FlightData.h = headpose[RX];
+ FlightData.r = headpose[RZ];
FlightData.status = fg_cmd;
//
diff --git a/ftnoir_protocol_fg/ftnoir_protocol_fg.h b/ftnoir_protocol_fg/ftnoir_protocol_fg.h
index 4ff2846f..3e2a1bf4 100644
--- a/ftnoir_protocol_fg/ftnoir_protocol_fg.h
+++ b/ftnoir_protocol_fg/ftnoir_protocol_fg.h
@@ -51,7 +51,7 @@ public:
void Initialize();
bool checkServerInstallationOK();
- void sendHeadposeToGame( THeadPoseData *headpose, THeadPoseData *rawheadpose );
+ void sendHeadposeToGame( double *headpose, double *rawheadpose );
void getNameFromGame( char *dest ); // Take care dest can handle up to 100 chars...
private: