summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_tracker_hatire/ftnoir_tracker_hat.h
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2013-11-27 02:32:24 +0100
committerStanislaw Halik <sthalik@misaki.pl>2013-11-27 02:32:24 +0100
commit09aeee333b807be87f456fa226fc0442d5a37364 (patch)
tree71f36a0ae58ca751ccd61671cdbb1fd58c877ac3 /ftnoir_tracker_hatire/ftnoir_tracker_hat.h
parent8e00d5a1599cc60a823191ed5351d68066682b16 (diff)
make hatire actually buildable
Remove 'captain obvious' comments, references to <windows.h>, fix spelling errors, use UI layouts, and so on Signed-off-by: Stanislaw Halik <sthalik@misaki.pl>
Diffstat (limited to 'ftnoir_tracker_hatire/ftnoir_tracker_hat.h')
-rw-r--r--ftnoir_tracker_hatire/ftnoir_tracker_hat.h59
1 files changed, 21 insertions, 38 deletions
diff --git a/ftnoir_tracker_hatire/ftnoir_tracker_hat.h b/ftnoir_tracker_hatire/ftnoir_tracker_hat.h
index 54e67f48..af583d11 100644
--- a/ftnoir_tracker_hatire/ftnoir_tracker_hat.h
+++ b/ftnoir_tracker_hatire/ftnoir_tracker_hat.h
@@ -1,33 +1,28 @@
#ifndef FTNOIR_TRACKER_HAT_H
#define FTNOIR_TRACKER_HAT_H
-#include "..\ftnoir_tracker_base\ftnoir_tracker_base.h"
+#include "facetracknoir/global-settings.h"
+#include "ftnoir_tracker_base/ftnoir_tracker_base.h"
#include "ftnoir_tracker_hat_settings.h"
#include "ftnoir_arduino_type.h"
-#include <QExtSerialPort\qextserialport.h>
-#include <QExtSerialPort\qextserialenumerator.h>
+#include <QtSerialPort/QSerialPort>
#include <QThread>
-#include <QReadWriteLock>
#include <QTimer>
#include <QSettings>
-#include "Windows.h"
-#include "math.h"
-
-class QextSerialPort;
-class QExtSerialEnumerator;
+#include <QMutex>
+#include <QMutexLocker>
+#include <cmath>
class FTNoIR_Tracker : public ITracker, QThread
{
public:
FTNoIR_Tracker();
- ~FTNoIR_Tracker();
+ virtual ~FTNoIR_Tracker() virt_override;
- void Initialize( QFrame *videoframe );
- void StartTracker( HWND parent_window );
- void StopTracker( bool exit );
- bool GiveHeadPoseData(THeadPoseData *data);
+ virtual void StartTracker( QFrame* frame ) virt_override;
+ virtual bool GiveHeadPoseData(double *data) virt_override;
void applysettings(const TrackerSettings& settings);
void notifyCenter();
@@ -39,18 +34,12 @@ public:
protected:
void run(); // qthread override run method
-
private:
- // Handles to neatly terminate thread...
- HANDLE m_StopThread;
- HANDLE m_WaitThread;
-
TArduinoData ArduinoData, HAT ; // Trame from Arduino
QByteArray datagram;
- QextSerialPort *SerialPort;
- QReadWriteLock rwlock;
- QList<QString>* ListErrInf ;
- int waitTimeout;
+ QSerialPort* SerialPort;
+ volatile bool stop;
+ QMutex lock;
QString sSerialPortName; // Port serial name
bool bEnableRoll;
bool bEnablePitch;
@@ -67,28 +56,22 @@ private:
bool bInvertZ;
- int iRollAxe;
- int iPitchAxe;
- int iYawAxe;
- int iXAxe;
- int iYAxe;
- int iZAxe;
+ int iRollAxis;
+ int iPitchAxis;
+ int iYawAxis;
+ int iXAxis;
+ int iYAxis;
+ int iZAxis;
};
-
-//*******************************************************************************************************
-// FaceTrackNoIR Tracker DLL. Functions used to get general info on the Tracker
-//*******************************************************************************************************
-class FTNoIR_TrackerDll : public ITrackerDll
+class FTNoIR_TrackerDll : public Metadata
{
public:
FTNoIR_TrackerDll();
~FTNoIR_TrackerDll();
- void Initialize();
-
- void getFullName(QString *strToBeFilled);
+ void getFullName(QString *strToBeFilled);
void getShortName(QString *strToBeFilled);
void getDescription(QString *strToBeFilled);
void getIcon(QIcon *icon);
@@ -99,4 +82,4 @@ private:
QString trackerDescription;
};
-#endif // FTNOIR_TRACKER_HAT_H \ No newline at end of file
+#endif // FTNOIR_TRACKER_HAT_H