diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2018-12-29 16:49:56 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2019-01-16 07:48:19 +0100 |
commit | a0bc55227ca1511a0c705e89c308ecbbdc7124c8 (patch) | |
tree | 80ceb975f155ce386dbc0049e9b379dd6e3b63d2 /tracker-pt/ftnoir_tracker_pt.h | |
parent | f1af5a5a6967cec291d0054c32f69545fd824c4f (diff) |
tracker/pt: cleanup, declarations, lock scope
Diffstat (limited to 'tracker-pt/ftnoir_tracker_pt.h')
-rw-r--r-- | tracker-pt/ftnoir_tracker_pt.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/tracker-pt/ftnoir_tracker_pt.h b/tracker-pt/ftnoir_tracker_pt.h index 8cf609c3..20cfaa8b 100644 --- a/tracker-pt/ftnoir_tracker_pt.h +++ b/tracker-pt/ftnoir_tracker_pt.h @@ -45,9 +45,9 @@ public: void data(double* data) override; bool center() override; - Affine pose(); int get_n_points(); - bool get_cam_info(pt_camera_info* info); + [[nodiscard]] bool get_cam_info(pt_camera_info& info); + Affine pose() const; public slots: bool maybe_reopen_camera(); void set_fov(int value); @@ -57,7 +57,6 @@ private: pointer<pt_runtime_traits> traits; QMutex camera_mtx; - QMutex data_mtx; PointTracker point_tracker; @@ -76,10 +75,8 @@ private: std::atomic<unsigned> point_count { 0 }; std::atomic<bool> ever_success { false }; - std::atomic_flag center_flag = ATOMIC_FLAG_INIT; - - static constexpr inline f rad2deg = f(180/M_PI); - //static constexpr float deg2rad = float(M_PI/180); + mutable std::atomic_flag center_flag = ATOMIC_FLAG_INIT; + mutable std::atomic_flag data_lock = ATOMIC_FLAG_INIT; }; } // ns pt_impl |