diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2014-09-20 12:16:26 +0200 | 
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2014-09-20 15:30:17 +0200 | 
| commit | 1c9e60221a52e9419780e81aedfe076ad157d014 (patch) | |
| tree | d4474e79d454fe5807c5f0ca415bbacbabd84fe4 | |
| parent | 5d8cdde055947ef9c8e157047f090b19e368140c (diff) | |
reformat only
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;  } | 
