summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp.cpp19
-rw-r--r--ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp.h22
-rw-r--r--ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp_dialog.cpp8
-rw-r--r--ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp_dll.cpp3
4 files changed, 26 insertions, 26 deletions
diff --git a/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp.cpp b/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp.cpp
index 811a08d9..3a63df6e 100644
--- a/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp.cpp
+++ b/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp.cpp
@@ -21,27 +21,28 @@ void TrackerImpl::run() {
float rot[6];
struct {
float pad[9];
- float rot[6];
+ float rot[6];
} raw_rot;
};
} data;
-
+
enum F {
flag_Raw = 1 << 0,
flag_Orient = 1 << 1,
Mask = flag_Raw | flag_Orient
};
- while (1) {
+ while (1) {
if (should_quit)
break;
{
float* orient = nullptr;
-
- while (sock.hasPendingDatagrams()) {
+
+ while (sock.hasPendingDatagrams())
+ {
data = decltype(data){0,0, 0,0,0};
(void) sock.readDatagram(reinterpret_cast<char*>(&data), sizeof(data));
-
+
int flags = data.flags & F::Mask;
switch (flags)
{
@@ -62,14 +63,14 @@ void TrackerImpl::run() {
pose[Yaw + i] = orient[i];
}
}
- usleep(4000);
- }
+ usleep(4000);
+ }
}
void TrackerImpl::StartTracker(QFrame*)
{
(void) sock.bind(QHostAddress::Any, (int) s.port, QUdpSocket::ShareAddress | QUdpSocket::ReuseAddressHint);
- start();
+ start();
}
void TrackerImpl::GetHeadPoseData(double *data)
diff --git a/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp.h b/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp.h
index b6fd544e..8cefb509 100644
--- a/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp.h
+++ b/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp.h
@@ -26,15 +26,15 @@ struct settings {
{}
};
-class TrackerImpl : public ITracker, protected QThread
+class TrackerImpl : public ITracker, private QThread
{
public:
- TrackerImpl();
+ TrackerImpl();
virtual ~TrackerImpl() override;
void StartTracker(QFrame *);
void GetHeadPoseData(double *data);
protected:
- void run();
+ virtual void run() override;
private:
double pose[6];
QUdpSocket sock;
@@ -47,23 +47,23 @@ class TrackerDialog : public QWidget, public ITrackerDialog
{
Q_OBJECT
public:
- TrackerDialog();
+ TrackerDialog();
void registerTracker(ITracker *) {}
void unRegisterTracker() {}
private:
- Ui::UI_freepie_udp_dialog ui;
+ Ui::UI_freepie_udp_dialog ui;
settings s;
private slots:
- void doOK();
- void doCancel();
+ void doOK();
+ void doCancel();
};
class TrackerMeta : public Metadata
{
public:
- void getFullName(QString *strToBeFilled);
- void getShortName(QString *strToBeFilled);
- void getDescription(QString *strToBeFilled);
- void getIcon(QIcon *icon);
+ void getFullName(QString *strToBeFilled);
+ void getShortName(QString *strToBeFilled);
+ void getDescription(QString *strToBeFilled);
+ void getIcon(QIcon *icon);
};
diff --git a/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp_dialog.cpp b/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp_dialog.cpp
index 702cc8a0..d845ff4a 100644
--- a/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp_dialog.cpp
+++ b/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp_dialog.cpp
@@ -3,10 +3,10 @@
TrackerDialog::TrackerDialog()
{
- ui.setupUi(this);
+ ui.setupUi(this);
- connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(doOK()));
- connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(doCancel()));
+ connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(doOK()));
+ connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(doCancel()));
tie_setting(s.port, ui.port);
tie_setting(s.enable_yaw, ui.chkEnableYaw);
@@ -16,7 +16,7 @@ TrackerDialog::TrackerDialog()
void TrackerDialog::doOK() {
s.b->save();
- this->close();
+ this->close();
}
void TrackerDialog::doCancel() {
diff --git a/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp_dll.cpp b/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp_dll.cpp
index 717975e3..cfaa9f47 100644
--- a/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp_dll.cpp
+++ b/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp_dll.cpp
@@ -1,5 +1,4 @@
#include "ftnoir_tracker_freepie-udp.h"
-#include <QDebug>
#include "facetracknoir/plugin-support.h"
void TrackerMeta::getFullName(QString *strToBeFilled)
@@ -24,5 +23,5 @@ void TrackerMeta::getIcon(QIcon *icon)
extern "C" FTNOIR_TRACKER_BASE_EXPORT Metadata* CALLING_CONVENTION GetMetadata()
{
- return new TrackerMeta;
+ return new TrackerMeta;
}