summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2019-02-22 15:33:46 +0100
committerStanislaw Halik <sthalik@misaki.pl>2019-02-22 15:33:46 +0100
commit20e0e96d324603fa00b1d4a3654210904ab164ea (patch)
tree0ec9714208fd11eee74a49c271116c38106ec17d
parentf5c005d713cdc1c4741f675f2ef939567a23b6f1 (diff)
cosmetic fixes only
-rw-r--r--logic/pipeline.cpp4
-rw-r--r--logic/pipeline.hpp5
-rw-r--r--tracker-pt/ftnoir_tracker_pt.h16
3 files changed, 11 insertions, 14 deletions
diff --git a/logic/pipeline.cpp b/logic/pipeline.cpp
index bc8026ed..255f63bc 100644
--- a/logic/pipeline.cpp
+++ b/logic/pipeline.cpp
@@ -285,7 +285,7 @@ void pipeline::maybe_set_center_pose(const Pose& value, bool own_center_logic)
libs.pFilter->center();
if (own_center_logic)
- center = {};
+ center = Pose();
else
center = value;
}
@@ -521,6 +521,8 @@ void pipeline::run()
{
logic();
+ using namespace time_units;
+
constexpr ns const_sleep_ms(ms{4});
const ns elapsed_nsecs = t.elapsed<ns>();
t.start();
diff --git a/logic/pipeline.hpp b/logic/pipeline.hpp
index 545a7836..fa32ec1e 100644
--- a/logic/pipeline.hpp
+++ b/logic/pipeline.hpp
@@ -26,7 +26,6 @@
namespace pipeline_impl {
using namespace euler;
-using namespace time_units;
using vec6_bool = Mat<bool, 6, 1>;
using vec3_bool = Mat<bool, 6, 1>;
@@ -55,8 +54,6 @@ public:
const vec6_bool& disable, bool neck_enable, int neck_z);
};
-using namespace time_units;
-
enum bit_flags : unsigned {
f_none = 0,
f_center = 1 << 0,
@@ -102,7 +99,7 @@ class OTR_LOGIC_EXPORT pipeline : private QThread
Pose center;
- ns backlog_time {};
+ time_units::ns backlog_time {};
bool tracking_started = false;
diff --git a/tracker-pt/ftnoir_tracker_pt.h b/tracker-pt/ftnoir_tracker_pt.h
index a53218df..210c6a01 100644
--- a/tracker-pt/ftnoir_tracker_pt.h
+++ b/tracker-pt/ftnoir_tracker_pt.h
@@ -30,13 +30,10 @@ class TrackerDialog_PT;
using namespace numeric_types;
-class Tracker_PT : public QThread, public ITracker
+struct Tracker_PT : QThread, ITracker
{
- Q_OBJECT
-
friend class TrackerDialog_PT;
-public:
template<typename t> using pointer = pt_pointer<t>;
explicit Tracker_PT(pointer<pt_runtime_traits> const& pt_runtime_traits);
@@ -48,12 +45,13 @@ public:
int get_n_points();
[[nodiscard]] bool get_cam_info(pt_camera_info& info);
Affine pose() const;
-public slots:
+
+private:
+ void run() override;
+
bool maybe_reopen_camera();
void set_fov(int value);
-protected:
- void run() override;
-private:
+
pointer<pt_runtime_traits> traits;
QMutex camera_mtx;
@@ -74,7 +72,7 @@ private:
pointer<pt_preview> preview_frame;
std::atomic<unsigned> point_count { 0 };
- std::atomic<bool> ever_success { false };
+ std::atomic<bool> ever_success = false;
mutable QMutex center_lock, data_lock;
};