diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2017-12-03 22:23:08 +0100 | 
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2017-12-04 12:19:26 +0100 | 
| commit | b256886a5cb9f2ae3ebda70a2045b19ed9f4233e (patch) | |
| tree | 4fa1e46de224cf834a05824dc1eb86001bdb3300 /tracker-tobii-eyex | |
| parent | e89709a801e7874bc02c66848c638c6a0ccc85c1 (diff) | |
api: add status check for modules
Diffstat (limited to 'tracker-tobii-eyex')
| -rw-r--r-- | tracker-tobii-eyex/tobii-eyex.cpp | 8 | ||||
| -rw-r--r-- | tracker-tobii-eyex/tobii-eyex.hpp | 2 | 
2 files changed, 4 insertions, 6 deletions
diff --git a/tracker-tobii-eyex/tobii-eyex.cpp b/tracker-tobii-eyex/tobii-eyex.cpp index e35c849e..604931d6 100644 --- a/tracker-tobii-eyex/tobii-eyex.cpp +++ b/tracker-tobii-eyex/tobii-eyex.cpp @@ -217,10 +217,8 @@ void tobii_eyex_tracker::event_handler(TX_CONSTHANDLE async_data_handle, TX_USER      txReleaseObject(&event_handle);  } -void tobii_eyex_tracker::start_tracker(QFrame*) +module_status tobii_eyex_tracker::start_tracker(QFrame*)  { -    dbg_verbose("start tracker"); -      bool status = true;      status &= txInitializeEyeX(TX_EYEXCOMPONENTOVERRIDEFLAG_NONE, nullptr, nullptr, nullptr, nullptr) == TX_RESULT_OK; @@ -231,9 +229,9 @@ void tobii_eyex_tracker::start_tracker(QFrame*)      status &= txEnableConnection(dev_ctx) == TX_RESULT_OK;      if (!status) -        dbg_verbose("connection can't be established. device missing?"); +        return error(QCoreApplication::translate("tobii", "Connection can't be established. device missing?"));      else -        dbg_verbose("api initialized"); +        return status_ok();  }  tobii_eyex_tracker::num tobii_eyex_tracker::gain(num x) diff --git a/tracker-tobii-eyex/tobii-eyex.hpp b/tracker-tobii-eyex/tobii-eyex.hpp index a86a4a76..8583acf0 100644 --- a/tracker-tobii-eyex/tobii-eyex.hpp +++ b/tracker-tobii-eyex/tobii-eyex.hpp @@ -28,7 +28,7 @@ class tobii_eyex_tracker : public ITracker  public:      tobii_eyex_tracker();      ~tobii_eyex_tracker() override; -    void start_tracker(QFrame *) override; +    module_status start_tracker(QFrame *) override;      void data(double *data) override;      bool center() override      {  | 
