summaryrefslogtreecommitdiffhomepage
path: root/opentrack-logic/tracker.h
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-08-10 10:41:13 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-08-10 10:42:05 +0200
commit8ee2337bc9e9285fac8bada710a2e39629ce5050 (patch)
tree31241c132de0812b095a73e39e7fba9961ef03f3 /opentrack-logic/tracker.h
parent9618b30b4e447a767e618d93dbb08c6dd54ef4c7 (diff)
logic/tracker: try keep constant Hz
- the timekeeping handling was incorrect and Hz was lower than expected - change Hz from 333 to 250 Hz - adjust track-logger usage
Diffstat (limited to 'opentrack-logic/tracker.h')
-rw-r--r--opentrack-logic/tracker.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/opentrack-logic/tracker.h b/opentrack-logic/tracker.h
index 2153f7c0..6dc48074 100644
--- a/opentrack-logic/tracker.h
+++ b/opentrack-logic/tracker.h
@@ -33,6 +33,9 @@ class OPENTRACK_LOGIC_EXPORT Tracker : private QThread
{
Q_OBJECT
private:
+ using rmat = euler::rmat;
+ using euler_t = euler::euler_t;
+
QMutex mtx;
main_settings s;
Mappings& m;
@@ -41,22 +44,20 @@ private:
Pose output_pose, raw_6dof, last_mapped, last_raw;
double newpose[6];
- volatile bool centerp;
- volatile bool enabledp;
- volatile bool zero_;
- volatile bool should_quit;
SelectedLibraries const& libs;
// The owner of the reference is the main window.
// This design might be usefull if we decide later on to swap out
// the logger while the tracker is running.
TrackLogger &logger;
- using rmat = euler::rmat;
- using euler_t = euler::euler_t;
-
rmat r_b, r_b_real;
double t_b[3];
+ volatile bool centerp;
+ volatile bool enabledp;
+ volatile bool zero_;
+ volatile bool should_quit;
+
double map(double pos, Map& axis);
void logic();
void t_compensate(const rmat& rmat, const euler_t& ypr, euler_t& output, bool rz);