blob: 57ead58dab44ac5da7ffb088e9496dd1c040fa75 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
#ifndef FTNOIR_TRACKER_HAT_H
#define FTNOIR_TRACKER_HAT_H
#ifdef OPENTRACK_API
# include "ftnoir_tracker_base/ftnoir_tracker_base.h"
# include "facetracknoir/global-settings.h"
#endif
#include "ftnoir_tracker_hat_settings.h"
#include "ftnoir_arduino_type.h"
#include <QObject>
#include <QPalette>
#include <QtGui>
#include <QByteArray>
#include <QMessageBox>
#include <QtSerialPort/QSerialPort>
#include <QtSerialPort/QSerialPortInfo>
#include <QMutex>
#include <QMutexLocker>
#include <QSettings>
#define VER_FILEVERSION_STR "Version 2.0.7\0"
class FTNoIR_Tracker : public QObject, public ITracker
{
Q_OBJECT
public:
FTNoIR_Tracker();
~FTNoIR_Tracker();
virtual void StartTracker(QFrame*);
virtual void GetHeadPoseData(double* data);
void applysettings(const TrackerSettings& settings);
void notifyCenter();
bool notifyZeroed();
void reset();
void SerialInfo();
void sendcmd(const QByteArray &cmd);
void get_info( int *tps );
private Q_SLOTS:
void SerialRead();
signals:
void sendMsgInfo(const QByteArray &MsgInfo);
private:
QSerialPort *ComPort;
TArduinoData ArduinoData, HAT ; // Trame from Arduino
QByteArray dataRead;
QByteArray dataToSend;
QByteArray Begin;
QByteArray End;
QMutex mutex;
int frame_cnt;
TrackerSettings settings;
int CptError;
};
//*******************************************************************************************************
// FaceTrackNoIR Tracker DLL. Functions used to get general info on the Tracker
//*******************************************************************************************************
class TrackerDll :
#if defined(OPENTRACK_API)
public Metadata
#else
public ITrackerDll
#endif
{
public:
TrackerDll();
~TrackerDll();
void getFullName(QString *strToBeFilled);
void getShortName(QString *strToBeFilled);
void getDescription(QString *strToBeFilled);
void getIcon(QIcon *icon);
private:
QString trackerFullName; // Trackers' name and description
QString trackerShortName;
QString trackerDescription;
};
#endif // FTNOIR_TRACKER_HAT_H
|