summaryrefslogtreecommitdiffhomepage
path: root/tracker-hatire/ftnoir_tracker_hat.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-11-04 19:15:54 +0100
committerStanislaw Halik <sthalik@misaki.pl>2016-11-04 19:48:11 +0100
commitb89699c7551f768bf4ff47820543f8c7b8c794af (patch)
treec3a21ec23a40250ec54b97fe17b9035a932cfaf8 /tracker-hatire/ftnoir_tracker_hat.cpp
parent068e0c7d432ede0a388fe1478b5146fcf1809315 (diff)
modules: make names unique
Diffstat (limited to 'tracker-hatire/ftnoir_tracker_hat.cpp')
-rw-r--r--tracker-hatire/ftnoir_tracker_hat.cpp54
1 files changed, 27 insertions, 27 deletions
diff --git a/tracker-hatire/ftnoir_tracker_hat.cpp b/tracker-hatire/ftnoir_tracker_hat.cpp
index 10964bba..421a0e26 100644
--- a/tracker-hatire/ftnoir_tracker_hat.cpp
+++ b/tracker-hatire/ftnoir_tracker_hat.cpp
@@ -14,17 +14,17 @@
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((char) 0xAA);
- Begin.append((char) 0xAA);
- End.append((char) 0x55);
- End.append((char) 0x55);
+ 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((char) 0xAA);
+ Begin.append((char) 0xAA);
+ End.append((char) 0x55);
+ End.append((char) 0x55);
}
hatire::~hatire()
@@ -37,16 +37,16 @@ void hatire::reset()
t.sendcmd_str(s.CmdReset);
}
-// return FPS
+// return FPS
void hatire::get_info( int *tps )
{
- *tps=frame_cnt;
- frame_cnt=0;
+ *tps=frame_cnt;
+ frame_cnt=0;
}
void hatire::start_tracker(QFrame*)
{
- CptError=0;
- frame_cnt=0;
+ CptError=0;
+ frame_cnt=0;
t.Log("Starting Tracker");
serial_result ret = t.init_serial_port();
@@ -136,14 +136,14 @@ void hatire::data(double *data)
if (CptError > 50)
{
emit t.serial_debug_info("Can't find HAT frame");
- CptError=0;
- }
+ CptError=0;
+ }
- // Need to handle this differently in opentrack as opposed to tracknoir
- //if (new_frame) {
- // in open track always populate the data, it seems opentrack always gives us a zeroed data structure to populate with pose data.
- // if we have no new data, we don't populate it and so 0 pose gets handed back which is wrong. By always running the code below, if we
- // have no new data, we will just give it the previous pose data which is the best thing we can do really.
+ // Need to handle this differently in opentrack as opposed to tracknoir
+ //if (new_frame) {
+ // in open track always populate the data, it seems opentrack always gives us a zeroed data structure to populate with pose data.
+ // if we have no new data, we don't populate it and so 0 pose gets handed back which is wrong. By always running the code below, if we
+ // have no new data, we will just give it the previous pose data which is the best thing we can do really.
const struct
{
@@ -167,11 +167,11 @@ void hatire::data(double *data)
k.place = (k.sign ? -1.f : 1.f) * (k.enable ? k.input : 0.f);
}
- // For debug
- //data->x=dataRead.length();
- //data->y=CptError;
+ // For debug
+ //data->x=dataRead.length();
+ //data->y=CptError;
}
#include "ftnoir_tracker_hat_dialog.h"
-OPENTRACK_DECLARE_TRACKER(hatire, TrackerControls, TrackerDll)
+OPENTRACK_DECLARE_TRACKER(hatire, dialog_hatire, hatire_metadata)