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/tobii-eyex.cpp | |
parent | e89709a801e7874bc02c66848c638c6a0ccc85c1 (diff) |
api: add status check for modules
Diffstat (limited to 'tracker-tobii-eyex/tobii-eyex.cpp')
-rw-r--r-- | tracker-tobii-eyex/tobii-eyex.cpp | 8 |
1 files changed, 3 insertions, 5 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) |