diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2018-10-05 15:59:58 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2018-10-05 14:35:44 +0000 |
commit | 9cca4ffd9987352e43119d9c4dea0ce84c2c448f (patch) | |
tree | 250e8092af1738ce51c268e2866dd75d67e879df /logic/pipeline.hpp | |
parent | f0216a3c53d43918295f1bd81975b391f4e5ed3b (diff) |
silly busywork
Diffstat (limited to 'logic/pipeline.hpp')
-rw-r--r-- | logic/pipeline.hpp | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/logic/pipeline.hpp b/logic/pipeline.hpp index 0cdeebfb..3be4f45e 100644 --- a/logic/pipeline.hpp +++ b/logic/pipeline.hpp @@ -25,8 +25,8 @@ namespace pipeline_impl { -using rmat = euler::rmat; -using euler_t = euler::euler_t; +using namespace euler; +using namespace time_units; using vec6_bool = Mat<bool, 6, 1>; using vec3_bool = Mat<bool, 6, 1>; @@ -49,7 +49,7 @@ class reltrans // this implements smooth transition into reltrans mode // once not aiming anymore. see `apply_pipeline()'. Timer interp_phase_timer; - unsigned RC_phase = 0; + unsigned RC_stage = 0; bool cur = false; bool in_zone = false; @@ -72,27 +72,27 @@ public: using namespace time_units; -struct OTR_LOGIC_EXPORT bits -{ - enum flags : unsigned { - f_center = 1 << 0, - f_held_center = 1 << 1, - f_enabled_h = 1 << 2, - f_enabled_p = 1 << 3, - f_zero = 1 << 4, - }; +enum bit_flags : unsigned { + f_center = 1 << 0, + f_held_center = 1 << 1, + f_enabled_h = 1 << 2, + f_enabled_p = 1 << 3, + f_zero = 1 << 4, +}; +struct OTR_LOGIC_EXPORT bits +{ std::atomic<unsigned> b; - void set(flags flag, bool val); - void negate(flags flag); - bool get(flags flag); + void set(bit_flags flag, bool val); + void negate(bit_flags flag); + bool get(bit_flags flag); bits(); }; -DEFINE_ENUM_OPERATORS(bits::flags); +DEFINE_ENUM_OPERATORS(bit_flags); -class OTR_LOGIC_EXPORT pipeline : private QThread, private bits +class OTR_LOGIC_EXPORT pipeline : private QThread { Q_OBJECT @@ -133,6 +133,8 @@ class OTR_LOGIC_EXPORT pipeline : private QThread, private bits Pose apply_reltrans(Pose value, vec6_bool disabled, bool centerp); Pose apply_zero_pos(Pose value) const; + bits b; + public: pipeline(Mappings& m, runtime_libraries& libs, event_handler& ev, TrackLogger& logger); ~pipeline() override; |