diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2017-05-30 02:32:23 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2017-05-30 02:32:23 +0200 |
commit | c52b5ad0a8340012fab7982f0c670a46c3e5d93d (patch) | |
tree | b54b567b006d4f2981285e320845dc1e05e47ff5 /logic/tracker.h | |
parent | 5b819219889e78093e0dd32615adb6dcdc66cbcb (diff) |
logic/tracker: allow for "hold-toggle" hold-enable
Must press "keypress-toggle" to toggle (uh) that mode.
Diffstat (limited to 'logic/tracker.h')
-rw-r--r-- | logic/tracker.h | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/logic/tracker.h b/logic/tracker.h index 2e6350d7..79961378 100644 --- a/logic/tracker.h +++ b/logic/tracker.h @@ -35,11 +35,12 @@ using Pose = Mat<double, 6, 1>; struct bits { - enum flags { + enum flags : unsigned { f_center = 1 << 0, - f_enabled = 1 << 1, - f_zero = 1 << 2, - f_should_quit = 1 << 3, + f_enabled_h = 1 << 1, + f_enabled_p = 1 << 2, + f_zero = 1 << 3, + f_should_quit = 1 << 4, }; std::atomic<unsigned> b; @@ -108,13 +109,11 @@ public: void raw_and_mapped_pose(double* mapped, double* raw) const; void start() { QThread::start(); } - void center() { set(f_center, true); } - - void set_toggle(bool value) { set(f_enabled, value); } - void set_zero(bool value) { set(f_zero, value); } - - void zero() { negate(f_zero); } - void toggle_enabled() { negate(f_enabled); } + void center(); + void set_toggle(bool value); + void set_zero(bool value); + void zero(); + void toggle_enabled(); }; } // ns impl |